From 5379d85d8ed09b35e293239d3a7f96f8f98c411c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elek=2C=20M=C3=A1rton?= Date: Sat, 13 Apr 2019 00:19:50 +0200 Subject: [PATCH] HDDS-1387. ConcurrentModificationException in TestMiniChaosOzoneCluster. Contributed by Marton Elek. (#732) --- .../java/org/apache/hadoop/ozone/MiniOzoneChaosCluster.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneChaosCluster.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneChaosCluster.java index 8bef479419..059af5a8b5 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneChaosCluster.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneChaosCluster.java @@ -136,11 +136,13 @@ void stopChaos() throws Exception { } 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); }