Skip to content

Commit 432271f

Browse files
committed
Increase timeouts waiting for test processes to start on slow machines
(merge main -> ce/main 107771) [git-p4: depot-paths = "//dev/coherence-ce/main/": change = 107774]
1 parent 1be901b commit 432271f

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

prj/test/distribution/topics-compatibility/topics-14.1.1.2206.3/src/test/java/topics/BaseTopicsTests.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2023, Oracle and/or its affiliates.
2+
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
55
* https://oss.oracle.com/licenses/upl.
@@ -8,6 +8,8 @@
88

99
import com.oracle.bedrock.Option;
1010
import com.oracle.bedrock.OptionsByType;
11+
import com.oracle.bedrock.options.Timeout;
12+
import com.oracle.bedrock.runtime.coherence.CoherenceCluster;
1113
import com.oracle.bedrock.runtime.coherence.CoherenceClusterMember;
1214
import com.oracle.bedrock.runtime.coherence.options.CacheConfig;
1315
import com.oracle.bedrock.runtime.coherence.options.ClusterName;
@@ -19,13 +21,15 @@
1921
import com.oracle.bedrock.runtime.java.options.IPv4Preferred;
2022
import com.oracle.bedrock.runtime.java.options.JvmOptions;
2123
import com.oracle.bedrock.runtime.options.DisplayName;
24+
import com.oracle.bedrock.runtime.options.StabilityPredicate;
2225
import com.oracle.bedrock.testsupport.MavenProjectFileUtils;
2326
import com.oracle.bedrock.testsupport.junit.TestLogsExtension;
2427
import com.oracle.coherence.common.base.Exceptions;
2528
import org.junit.jupiter.api.Order;
2629
import org.junit.jupiter.api.extension.RegisterExtension;
2730

2831
import java.io.File;
32+
import java.util.concurrent.TimeUnit;
2933

3034
/**
3135
* A base class for topics compatibility tests.
@@ -114,6 +118,8 @@ static ClosableCluster createCluster(String sClusterName, Version version, int c
114118
IPv4Preferred.yes(),
115119
JvmOptions.include("-XX:+ExitOnOutOfMemoryError", "-XX:HeapDumpPath=" + file.getAbsolutePath()),
116120
HeapSize.of(64, HeapSize.Units.MB, 512, HeapSize.Units.MB, true),
121+
StabilityPredicate.of(CoherenceCluster.Predicates.isCoherenceRunning()),
122+
Timeout.after(5, TimeUnit.MINUTES),
117123
m_testLogs);
118124

119125
optionsByType.addAll(options);

prj/test/distribution/topics-compatibility/topics-14.1.1.2206.3/src/test/java/topics/PubSubTests.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
/*
2-
* Copyright (c) 2000, 2023, Oracle and/or its affiliates.
2+
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
55
* https://oss.oracle.com/licenses/upl.
66
*/
77
package topics;
88

9+
import com.oracle.bedrock.options.Timeout;
910
import com.oracle.bedrock.runtime.coherence.CoherenceClusterMember;
1011
import com.oracle.bedrock.testsupport.deferred.Eventually;
1112
import com.oracle.coherence.common.util.Threads;
@@ -200,8 +201,8 @@ protected void shouldPubAndSub(ClosableCluster cluster, Version clusterVersion,
200201
try (CoherenceClusterMember memberPub = cluster.startPublisher("PublisherOne", pubSubVersion.getClassPath());
201202
CoherenceClusterMember memberSub = cluster.startSubscriber("SubscriberOne", pubSubVersion.getClassPath()))
202203
{
203-
Eventually.assertDeferred(memberPub::isCoherenceRunning, is(true));
204-
Eventually.assertDeferred(memberSub::isCoherenceRunning, is(true));
204+
Eventually.assertDeferred(memberPub::isCoherenceRunning, is(true), Timeout.after(5, TimeUnit.MINUTES));
205+
Eventually.assertDeferred(memberSub::isCoherenceRunning, is(true), Timeout.after(5, TimeUnit.MINUTES));
205206

206207
String sTopicName = "test-topic";
207208
String sGroupName = "test-group";
@@ -234,9 +235,9 @@ protected void shouldPubWithMultipleSubs(ClosableCluster cluster, Version cluste
234235
CoherenceClusterMember memberSub1 = cluster.startSubscriber("SubscriberOne", pubSubVersion.getClassPath());
235236
CoherenceClusterMember memberSub2 = cluster.startSubscriber("SubscriberTwo", pubSubVersion.getClassPath()))
236237
{
237-
Eventually.assertDeferred(memberPub::isCoherenceRunning, is(true));
238-
Eventually.assertDeferred(memberSub1::isCoherenceRunning, is(true));
239-
Eventually.assertDeferred(memberSub2::isCoherenceRunning, is(true));
238+
Eventually.assertDeferred(memberPub::isCoherenceRunning, is(true), Timeout.after(5, TimeUnit.MINUTES));
239+
Eventually.assertDeferred(memberSub1::isCoherenceRunning, is(true), Timeout.after(5, TimeUnit.MINUTES));
240+
Eventually.assertDeferred(memberSub2::isCoherenceRunning, is(true), Timeout.after(5, TimeUnit.MINUTES));
240241

241242
String sTopicName = "test-topic";
242243
String sGroupName = "test-group";
@@ -284,9 +285,9 @@ protected void shouldPubWithMultipleSubsAndReallocation(ClosableCluster cluster,
284285
CoherenceClusterMember memberSub1 = cluster.startSubscriber("SubscriberOne", pubSubVersion.getClassPath());
285286
CoherenceClusterMember memberSub2 = cluster.startSubscriber("SubscriberTwo", pubSubVersion.getClassPath()))
286287
{
287-
Eventually.assertDeferred(memberPub::isCoherenceRunning, is(true));
288-
Eventually.assertDeferred(memberSub1::isCoherenceRunning, is(true));
289-
Eventually.assertDeferred(memberSub2::isCoherenceRunning, is(true));
288+
Eventually.assertDeferred(memberPub::isCoherenceRunning, is(true), Timeout.after(5, TimeUnit.MINUTES));
289+
Eventually.assertDeferred(memberSub1::isCoherenceRunning, is(true), Timeout.after(5, TimeUnit.MINUTES));
290+
Eventually.assertDeferred(memberSub2::isCoherenceRunning, is(true), Timeout.after(5, TimeUnit.MINUTES));
290291

291292
cluster.log(">>>> Starting shouldPubWithMultipleSubsAndReallocation");
292293

@@ -336,7 +337,7 @@ protected void shouldPubWithMultipleSubsAndReallocation(ClosableCluster cluster,
336337
cluster.log(">>>> In shouldPubWithMultipleSubsAndReallocation - closed subscribers");
337338

338339
Eventually.assertDeferred(() -> TopicSubscriber.getChannelCount(memberSub1, "Sub1.2")
339-
+ TopicSubscriber.getChannelCount(memberSub2, "Sub2.2"), is(17));
340+
+ TopicSubscriber.getChannelCount(memberSub2, "Sub2.2"), is(17), Timeout.after(5, TimeUnit.MINUTES));
340341

341342
cluster.log(">>>> In shouldPubWithMultipleSubsAndReallocation - subscriber have all channels");
342343

0 commit comments

Comments
 (0)