Skip to content

Commit 944931e

Browse files
authored
IGNITE-27206 Fixed flaky the testRemovedConnectionMetrics test (#12545)
1 parent bd27205 commit 944931e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/CommunicationConnectionPoolMetricsTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ public class CommunicationConnectionPoolMetricsTest extends GridCommonAbstractTe
7979
/** */
8080
private volatile long maxConnIdleTimeout = TcpCommunicationSpi.DFLT_IDLE_CONN_TIMEOUT;
8181

82+
/** */
83+
private int ackSendThreshold = TcpCommunicationSpi.DFLT_ACK_SND_THRESHOLD;
84+
8285
/** */
8386
private volatile int createClientDelay;
8487

@@ -126,6 +129,7 @@ public static Collection<Object[]> params() {
126129
communicationSpi.setConnectionsPerNode(connsPerNode)
127130
.setUsePairedConnections(pairedConns)
128131
.setIdleConnectionTimeout(maxConnIdleTimeout)
132+
.setAckSendThreshold(ackSendThreshold)
129133
.setMessageQueueLimit(msgQueueLimit);
130134

131135
cfg.setCommunicationSpi(communicationSpi);
@@ -140,6 +144,10 @@ public static Collection<Object[]> params() {
140144
public void testRemovedConnectionMetrics() throws Exception {
141145
maxConnIdleTimeout = 500;
142146

147+
// Prevents keeping connections idle by lazy sending of the unacknowledged messages.
148+
if (pairedConns)
149+
ackSendThreshold = 1;
150+
143151
Ignite srvr = startGridsMultiThreaded(2);
144152
Ignite cli = startClientGrid(G.allGrids().size());
145153

0 commit comments

Comments
 (0)