diff --git a/testing/adios2/engine/staging-common/TestCommonReadAttrs.cpp b/testing/adios2/engine/staging-common/TestCommonReadAttrs.cpp index c3b392ddd6..e372d52a23 100644 --- a/testing/adios2/engine/staging-common/TestCommonReadAttrs.cpp +++ b/testing/adios2/engine/staging-common/TestCommonReadAttrs.cpp @@ -293,16 +293,18 @@ TEST_F(CommonReadTest, ADIOS2CommonRead1D8) TimeGapDetected++; } - if (TimeGapExpected) + if (!IgnoreTimeGap) { - EXPECT_TRUE(TimeGapDetected); + if (TimeGapExpected) + { + EXPECT_TRUE(TimeGapDetected); + } + else + { + EXPECT_FALSE(TimeGapDetected); + } } - else - { - EXPECT_EQ(t, NSteps); - EXPECT_FALSE(TimeGapDetected); - } // Close the file engine.Close(); }