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

reta pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/main by this push:
     new 3ff5a8f32a Fix flakiness in 
org.apache.cxf.io.DelayedCachedOutputStreamCleanerTest.testCleanOnShutdown test 
case
3ff5a8f32a is described below

commit 3ff5a8f32a51f1de48bb3c5e724db68dae66a68a
Author: Andriy Redko <[email protected]>
AuthorDate: Sat Nov 16 12:22:57 2024 -0500

    Fix flakiness in 
org.apache.cxf.io.DelayedCachedOutputStreamCleanerTest.testCleanOnShutdown test 
case
---
 .../org/apache/cxf/io/DelayedCachedOutputStreamCleanerTest.java   | 8 +++-----
 1 file changed, 3 insertions(+), 5 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 8fcb12cf46..1cd557c1c6 100644
--- 
a/core/src/test/java/org/apache/cxf/io/DelayedCachedOutputStreamCleanerTest.java
+++ 
b/core/src/test/java/org/apache/cxf/io/DelayedCachedOutputStreamCleanerTest.java
@@ -147,14 +147,13 @@ public class DelayedCachedOutputStreamCleanerTest {
     
     @Test
     public void testCleanOnShutdown() throws InterruptedException {
-        /* Delay of 2.5 seconds */
-        final Map<String, Object> properties = 
Collections.singletonMap(CachedConstants.CLEANER_DELAY_BUS_PROP, 2500);
+        /* Delay of 5 seconds */
+        final Map<String, Object> properties = 
Collections.singletonMap(CachedConstants.CLEANER_DELAY_BUS_PROP, 5000);
         bus = new ExtensionManagerBus(new HashMap<>(), properties);
 
         final AtomicBoolean latch = new AtomicBoolean();
         final Closeable closeable = () -> latch.compareAndSet(false, true);
 
-        bus.setProperty(CachedConstants.CLEANER_DELAY_BUS_PROP, 2500); /* 2.5 
seconds */
         final CachedOutputStreamCleaner cleaner = 
bus.getExtension(CachedOutputStreamCleaner.class);
         cleaner.register(closeable);
 
@@ -169,14 +168,13 @@ public class DelayedCachedOutputStreamCleanerTest {
     public void testCleanOnShutdownDisabled() throws InterruptedException {
         /* Delay of 2.5 seconds */
         final Map<String, Object> properties = new HashMap<>();
-        properties.put(CachedConstants.CLEANER_DELAY_BUS_PROP, 2500);
+        properties.put(CachedConstants.CLEANER_DELAY_BUS_PROP, 2500); /* 2.5 
seconds */
         properties.put(CachedConstants.CLEANER_CLEAN_ON_SHUTDOWN_BUS_PROP, 
false);
         bus = new ExtensionManagerBus(new HashMap<>(), properties);
 
         final AtomicBoolean latch = new AtomicBoolean();
         final Closeable closeable = () -> latch.compareAndSet(false, true);
 
-        bus.setProperty(CachedConstants.CLEANER_DELAY_BUS_PROP, 2500); /* 2.5 
seconds */
         final CachedOutputStreamCleaner cleaner = 
bus.getExtension(CachedOutputStreamCleaner.class);
         cleaner.register(closeable);
 

Reply via email to