Commit 986666b6 authored by Joachim Sauer's avatar Joachim Sauer
Browse files

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
parent 19517bad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment