소스 검색

HDDS-1387. ConcurrentModificationException in TestMiniChaosOzoneCluster. Contributed by Marton Elek. (#732)

Elek, Márton 6 년 전
부모
커밋
5379d85d8e
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneChaosCluster.java

+ 3 - 1
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneChaosCluster.java

@@ -136,11 +136,13 @@ public class MiniOzoneChaosCluster extends MiniOzoneClusterImpl {
   }
 
   public void shutdown() {
-    super.shutdown();
     try {
       stopChaos();
       executorService.shutdown();
       executorService.awaitTermination(1, TimeUnit.DAYS);
+      //this should be called after stopChaos to be sure that the
+      //datanode collection is not modified during the shutdown
+      super.shutdown();
     } catch (Exception e) {
       LOG.error("failed to shutdown MiniOzoneChaosCluster", e);
     }