You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/06/23 06:17:03 UTC
[GitHub] [ozone] umamaheswararao commented on a diff in pull request #3529: HDDS-6812. Fix INTERNAL_ERROR message on failed write.
umamaheswararao commented on code in PR #3529:
URL: https://github.com/apache/ozone/pull/3529#discussion_r904619448
##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestWritableECContainerProvider.java:
##########
@@ -261,12 +263,18 @@ public Pipeline createPipeline(ReplicationConfig repConf,
provider = new WritableECContainerProvider(
conf, pipelineManager, containerManager, pipelineChoosingPolicy);
- ContainerInfo container =
- provider.getContainer(1, repConfig, OWNER, new ExcludeList());
+ try {
+ provider.getContainer(1, repConfig, OWNER, new ExcludeList());
+ } catch (IOException ex) {
+ GenericTestUtils.assertExceptionContains("Cannot create pipelines", ex);
+ }
+
for (int i = 0; i < 5; i++) {
- ContainerInfo nextContainer =
- provider.getContainer(1, repConfig, OWNER, new ExcludeList());
- assertEquals(container, nextContainer);
+ try {
+ provider.getContainer(1, repConfig, OWNER, new ExcludeList());
Review Comment:
Same as above. Please few other places need to handle this.
##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestWritableECContainerProvider.java:
##########
@@ -234,9 +234,11 @@ public Pipeline createPipeline(ReplicationConfig repConf,
provider = new WritableECContainerProvider(
conf, pipelineManager, containerManager, pipelineChoosingPolicy);
- ContainerInfo container =
- provider.getContainer(1, repConfig, OWNER, new ExcludeList());
- assertNull(container);
+ try {
+ provider.getContainer(1, repConfig, OWNER, new ExcludeList());
Review Comment:
You have to add Assert.fail here. Lets say if above statement does not throw exception, then case will pass.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org