This is an automated email from the ASF dual-hosted git repository. elek pushed a commit to branch HDDS-2254 in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git
commit 3a77480b0e0bef2d315ab1f9d875908fe1310c0c Author: Aravindan Vijayan <avija...@cloudera.com> AuthorDate: Sat Oct 5 08:48:37 2019 -0700 HDDS-2254 : Fix flaky unit test TestContainerStateMachine#testRatisSnapshotRetention --- .../hadoop/ozone/client/rpc/TestContainerStateMachine.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachine.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachine.java index 19a1707..21791d2 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachine.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachine.java @@ -159,12 +159,6 @@ public class TestContainerStateMachine { @Test public void testRatisSnapshotRetention() throws Exception { - ContainerStateMachine stateMachine = - (ContainerStateMachine) ContainerTestHelper.getStateMachine(cluster); - SimpleStateMachineStorage storage = - (SimpleStateMachineStorage) stateMachine.getStateMachineStorage(); - Assert.assertNull(storage.findLatestSnapshot()); - // Write 10 keys. Num snapshots should be equal to config value. for (int i = 1; i <= 10; i++) { OzoneOutputStream key = @@ -180,9 +174,10 @@ public class TestContainerStateMachine { RatisServerConfiguration ratisServerConfiguration = conf.getObject(RatisServerConfiguration.class); - stateMachine = + ContainerStateMachine stateMachine = (ContainerStateMachine) ContainerTestHelper.getStateMachine(cluster); - storage = (SimpleStateMachineStorage) stateMachine.getStateMachineStorage(); + SimpleStateMachineStorage storage = (SimpleStateMachineStorage) + stateMachine.getStateMachineStorage(); Path parentPath = storage.findLatestSnapshot().getFile().getPath(); int numSnapshots = parentPath.getParent().toFile().listFiles().length; Assert.assertTrue(Math.abs(ratisServerConfiguration --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-commits-h...@hadoop.apache.org