From c5886a8fddbedba195ef80527ce83e628a4eb5c2 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Sat, 30 Nov 2024 19:44:59 -0500 Subject: [PATCH] Fix flaky org.apache.cxf.io.DelayedCachedOutputStreamCleanerTest.testCleanOnShutdownDisabled test case (OpenJ9) (cherry picked from commit 8684601b1ea84373a70f44b4bd95537649e04f8f) (cherry picked from commit daf5620a5328ba3edb66e20fe4b1bce94b97cc85) --- .../apache/cxf/io/DelayedCachedOutputStreamCleanerTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/test/java/org/apache/cxf/io/DelayedCachedOutputStreamCleanerTest.java b/core/src/test/java/org/apache/cxf/io/DelayedCachedOutputStreamCleanerTest.java index 1cd557c1c64..3c6c6a82f7d 100644 --- a/core/src/test/java/org/apache/cxf/io/DelayedCachedOutputStreamCleanerTest.java +++ b/core/src/test/java/org/apache/cxf/io/DelayedCachedOutputStreamCleanerTest.java @@ -166,9 +166,9 @@ public void testCleanOnShutdown() throws InterruptedException { @Test public void testCleanOnShutdownDisabled() throws InterruptedException { - /* Delay of 2.5 seconds */ + /* Delay of 3 seconds */ final Map properties = new HashMap<>(); - properties.put(CachedConstants.CLEANER_DELAY_BUS_PROP, 2500); /* 2.5 seconds */ + properties.put(CachedConstants.CLEANER_DELAY_BUS_PROP, 3000); /* 3 seconds */ properties.put(CachedConstants.CLEANER_CLEAN_ON_SHUTDOWN_BUS_PROP, false); bus = new ExtensionManagerBus(new HashMap<>(), properties); @@ -182,7 +182,7 @@ public void testCleanOnShutdownDisabled() throws InterruptedException { bus.shutdown(true); // The Closeable::close should not be called since timer(s) is cancelled - await().during(3, TimeUnit.SECONDS).untilAtomic(latch, is(false)); + await().during(4, TimeUnit.SECONDS).atMost(5, TimeUnit.SECONDS).untilAtomic(latch, is(false)); } @Test