Skip to content

Commit cf8a3c2

Browse files
committed
Harden TopicChannelCountRecoveryTests
(merge ce/main -> ce/24.03 109963) [git-p4: depot-paths = "//dev/coherence-ce/release/coherence-ce-v24.03/": change = 109966]
1 parent 0a2afbc commit cf8a3c2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

prj/test/functional/topics/src/main/java/topics/TopicChannelCountRecoveryTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ private CoherenceCluster startCluster(String suffix, boolean fStorage, int cMemb
124124
SystemProperty.of("test.log.level", "9"),
125125
SystemProperty.of("test.log", "stderr"),
126126
SystemProperty.of("coherence.distributed.partitioncount", "13"),
127-
StabilityPredicate.of(CoherenceCluster.Predicates.isReady()),
127+
StabilityPredicate.of(CoherenceCluster.Predicates.isCoherenceRunning()),
128128
LocalStorage.enabled(fStorage),
129129
Logging.atMax(),
130130
JMXManagementMode.ALL,

prj/test/functional/topics/src/main/java/topics/callables/EnsureTopic.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import com.oracle.bedrock.runtime.concurrent.RemoteCallable;
1111
import com.oracle.coherence.common.base.Logger;
12+
import com.oracle.coherence.common.util.Duration;
1213
import com.tangosol.net.CacheFactory;
1314
import com.tangosol.net.Coherence;
1415
import com.tangosol.net.Session;
@@ -32,7 +33,10 @@ public EnsureTopic(String sName, String sGroup)
3233
public Boolean call() throws Exception
3334
{
3435
Logger.info("Ensuring topic " + f_sName);
35-
NamedTopic<?> topic = Coherence.getInstance().getSession().getTopic(f_sName);
36+
Coherence coherence = Coherence.getInstance();
37+
coherence.startAndWait();
38+
39+
NamedTopic<?> topic = coherence.getSession().getTopic(f_sName);
3640
if (f_sGroup != null && !f_sGroup.isEmpty())
3741
{
3842
Logger.info("Ensuring subscriber group " + f_sGroup + " for topic " + f_sName);

0 commit comments

Comments
 (0)