You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by si...@apache.org on 2023/04/04 20:39:46 UTC

[ozone] branch master updated: HDDS-8304. [Snapshot] Reduce flakiness in testSkipTrackingWithZeroSnapshot (#4487)

This is an automated email from the ASF dual-hosted git repository.

siyao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 40e6875a7e HDDS-8304. [Snapshot] Reduce flakiness in testSkipTrackingWithZeroSnapshot (#4487)
40e6875a7e is described below

commit 40e6875a7e6b5be1d6bf617a441e1c9aab1eb72b
Author: Siyao Meng <50...@users.noreply.github.com>
AuthorDate: Tue Apr 4 13:39:37 2023 -0700

    HDDS-8304. [Snapshot] Reduce flakiness in testSkipTrackingWithZeroSnapshot (#4487)
---
 .../java/org/apache/hadoop/ozone/freon/TestOMSnapshotDAG.java  | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/freon/TestOMSnapshotDAG.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/freon/TestOMSnapshotDAG.java
index e2ddfcdd7f..041383264f 100644
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/freon/TestOMSnapshotDAG.java
+++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/freon/TestOMSnapshotDAG.java
@@ -301,10 +301,12 @@ public class TestOMSnapshotDAG {
     Path logPath = Paths.get(omMetadataDir, OM_SNAPSHOT_DIFF_DIR,
         DB_COMPACTION_LOG_DIR);
     File[] fileList = logPath.toFile().listFiles();
-    Assertions.assertNotNull(fileList);
-    for (File file : fileList) {
-      if (file != null && file.isFile() && file.getName().endsWith(".log")) {
-        Assertions.assertEquals(0L, file.length());
+    // fileList can be null when compaction log directory is not even created
+    if (fileList != null) {
+      for (File file : fileList) {
+        if (file != null && file.isFile() && file.getName().endsWith(".log")) {
+          Assertions.assertEquals(0L, file.length());
+        }
       }
     }
     // Verify that no SST has been backed up


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org