HDDS-982. Fix TestContainerDataYaml#testIncorrectContainerFile. Contributed by Doroszlai, Attila.

This commit is contained in:
Márton Elek 2019-01-23 11:31:07 +01:00
parent 721d5c2a5f
commit 2d69a35614
2 changed files with 5 additions and 6 deletions

View File

@ -138,15 +138,14 @@ public class TestContainerDataYaml {
KeyValueContainerData kvData = (KeyValueContainerData) ContainerDataYaml
.readContainerFile(file);
fail("testIncorrectContainerFile failed");
} catch (IllegalStateException ex) {
GenericTestUtils.assertExceptionContains("Unexpected " +
"ContainerLifeCycleState", ex);
} catch (IllegalArgumentException ex) {
GenericTestUtils.assertExceptionContains("No enum constant", ex);
}
}
@Test
public void testCheckBackWardCompatabilityOfContainerFile() throws
public void testCheckBackWardCompatibilityOfContainerFile() throws
IOException {
// This test is for if we upgrade, and then .container files added by new
// server will have new fields added to .container file, after a while we
@ -178,7 +177,7 @@ public class TestContainerDataYaml {
} catch (Exception ex) {
ex.printStackTrace();
fail("testCheckBackWardCompatabilityOfContainerFile failed");
fail("testCheckBackWardCompatibilityOfContainerFile failed");
}
}

View File

@ -9,5 +9,5 @@ maxSize: 5368709120
originPipelineId: b2c96aa4-b757-4f97-b286-6fb80a1baf8e
originNodeId: 6dcfb385-caea-4efb-9ef3-f87fadca0f51
metadata: {OWNER: ozone, VOLUME: hdfs}
state: INVALID
state: NO_SUCH_STATE
checksum: 08bc9d390f9183aeed3cf33c789e2a07310bba60f3cf55941caccc939db8670f