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

View File

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