Use BeforeClass instead of BeforeMethod.
Several java.time tests use @BeforeMethod to populate a field that is used as in @DataProvider methods. @BeforeMethod runs after @DataProvider is executed, 'though. The only reason this worked is because the first test that's run in those tests doesn't use the @DataProvider, so by the time it's executed, the field will already have been populated. Change the field initialization to use @BeforeClass and change the affected fields to static. Test: CtsLibcoreOjTestCases Bug: 28832222 Change-Id: I499dde830a456dced8375632c45801640f795e33
Loading
Please sign in to comment