Jean-Daniel Cryans has submitted this change and it was merged. Change subject: [java client] fix reruns of TestKuduTable.testGetLocations ......................................................................
[java client] fix reruns of TestKuduTable.testGetLocations The test expected a table count including the table created in testAlterTable, which meant that surefire reruns would always fail, as they clean up the minicluster state (via @AfterClass) but only run the particular failed test. Why not generalize? My thought process went something like this: 1. Let's add an @After to BaseKuduTest that enumerates all tables and deletes them. 2. #1 is a tax on every test, and besides, if we're going to undo all destructive changes, we should also restart stopped processes. 3. If we're going to do #2, we may as well convert the existing @BeforeClass and @AfterClass into @Before and @After instead, since that's the same thing semantically but less code and guaranteed to capture every change. 4. But cluster setup in the Java tests is slow due to the Thread.sleep(300) performed by every started daemon. Let's do what we do in C++ tests and ask the servers to dump a file, sleeping until that file appears. 5. #4 is a lot of refactoring and doesn't address the multiple master case well. Let's punt on the whole endeavour and do a targeted fix instead. Change-Id: I44220d3c5ee1816f2bcf345c6062d33616145da2 Reviewed-on: http://gerrit.cloudera.org:8080/3319 Tested-by: Kudu Jenkins Reviewed-by: Jean-Daniel Cryans --- M java/kudu-client/src/test/java/org/kududb/client/TestKuduTable.java 1 file changed, 30 insertions(+), 22 deletions(-) Approvals: Jean-Daniel Cryans: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/3319 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I44220d3c5ee1816f2bcf345c6062d33616145da2 Gerrit-PatchSet: 4 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Adar Dembo <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Jean-Daniel Cryans Gerrit-Reviewer: Kudu Jenkins
