Skip to content

Commit c956222

Browse files
committed
Bug 35576586 - Build: very intermittent timeout forming single node cluster bootstrap.SessionLifecycleTests.shouldReceiveSystemAndConfiguredSessionEventsWhenClusterMember (14.1.1.2206 cl 118017 --> 22.06)
[git-p4: depot-paths = "//dev/coherence-ce/release/coherence-ce-v22.06/": change = 118589]
1 parent fc4481e commit c956222

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

prj/test/functional/bootstrap/src/main/java/bootstrap/SessionLifecycleTests.java

Lines changed: 17 additions & 1 deletion
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, 2025, 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 bootstrap;
88

9+
import com.oracle.bedrock.runtime.LocalPlatform;
910
import com.tangosol.net.CacheFactory;
1011
import com.tangosol.net.Coherence;
1112
import com.tangosol.net.CoherenceConfiguration;
@@ -17,8 +18,10 @@
1718
import com.tangosol.net.events.annotation.SessionLifecycleEvents;
1819
import com.tangosol.net.events.application.LifecycleEvent;
1920
import org.junit.jupiter.api.AfterEach;
21+
import org.junit.jupiter.api.BeforeEach;
2022
import org.junit.jupiter.api.BeforeAll;
2123
import org.junit.jupiter.api.Test;
24+
import org.junit.jupiter.api.TestInfo;
2225

2326
import java.util.ArrayList;
2427
import java.util.List;
@@ -45,6 +48,15 @@ static void setup()
4548
System.setProperty("coherence.cluster", "CoherenceBootstrapTests");
4649
}
4750

51+
@BeforeEach
52+
public void setupTest(TestInfo info)
53+
{
54+
System.err.println(">>>> Starting test " + info.getDisplayName());
55+
56+
m_nClusterPort = LocalPlatform.get().getAvailablePorts().next();
57+
System.setProperty("test.multicast.port", String.valueOf(m_nClusterPort));
58+
}
59+
4860
@AfterEach
4961
void cleanup()
5062
{
@@ -291,4 +303,8 @@ public void onEvent(LifecycleEvent event)
291303

292304
final Map<String, List<LifecycleEvent.Type>> f_events = new ConcurrentHashMap<>();
293305
}
306+
307+
// ----- data members ---------------------------------------------------
308+
309+
private static int m_nClusterPort;
294310
}

0 commit comments

Comments
 (0)