[
https://issues.apache.org/jira/browse/IGNITE-26931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexander Lapin updated IGNITE-26931:
-------------------------------------
Description:
{code:java}
org.apache.ignite.internal.future.timeout.TimeoutWorkerTest.testTimeout()
org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
at
app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at
app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at app//org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:31)
at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:183)
at
app//org.apache.ignite.internal.future.timeout.TimeoutWorkerTest.testTimeout(TimeoutWorkerTest.java:64)
at [email protected]/java.lang.reflect.Method.invoke(Method.java:568)
at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1511)
at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1511)
{code}
The problem was in test where we check
{code:java}
assertThat(timeoutFuture, willThrow(TimeoutException.class));
assertTrue(reqMap.isEmpty());{code}
despite the fact that in TimeoutWorker itself we first complete the
timeoutFuture with an Exception and then remove it from the map.
{code:java}
fut.completeExceptionally(new TimeoutException(timeoutObject.describe()));
requestsMap.remove(entry.getKey(), timeoutObject);
{code}
Thus, the race is possible when first assertion is matches but the entry is
still in map.
was:
{code:java}
org.apache.ignite.internal.future.timeout.TimeoutWorkerTest.testTimeout()
org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
at
app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at
app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at app//org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:31)
at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:183)
at
app//org.apache.ignite.internal.future.timeout.TimeoutWorkerTest.testTimeout(TimeoutWorkerTest.java:64)
at [email protected]/java.lang.reflect.Method.invoke(Method.java:568)
at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1511)
at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1511)
{code}
The problem was in test where we check
{code:java}
assertThat(timeoutFuture, willThrow(TimeoutException.class));
assertTrue(reqMap.isEmpty());{code}
despite the fact that in TimeoutWorker itself we first complete the
timeoutFuture with an Exception and then remove it from the map.
{code:java}
fut.completeExceptionally(new TimeoutException(timeoutObject.describe()));
requestsMap.remove(entry.getKey(), timeoutObject);
{code}
Thus, the race is possible when first assertion is matches but the entry is
still in map.
> TimeoutWorkerTest.testTimeout is flaky
> --------------------------------------
>
> Key: IGNITE-26931
> URL: https://issues.apache.org/jira/browse/IGNITE-26931
> Project: Ignite
> Issue Type: Bug
> Reporter: Alexander Lapin
> Priority: Major
> Labels: MakeTeamcityGreenAgain, ignite-3
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {code:java}
> org.apache.ignite.internal.future.timeout.TimeoutWorkerTest.testTimeout()
> org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
> org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
> at
> app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
> at
> app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
> at
> app//org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
> at
> app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
> at
> app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:31)
> at
> app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:183)
> at
> app//org.apache.ignite.internal.future.timeout.TimeoutWorkerTest.testTimeout(TimeoutWorkerTest.java:64)
> at [email protected]/java.lang.reflect.Method.invoke(Method.java:568)
> at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1511)
> at [email protected]/java.util.ArrayList.forEach(ArrayList.java:1511)
> {code}
> The problem was in test where we check
> {code:java}
> assertThat(timeoutFuture, willThrow(TimeoutException.class));
> assertTrue(reqMap.isEmpty());{code}
> despite the fact that in TimeoutWorker itself we first complete the
> timeoutFuture with an Exception and then remove it from the map.
> {code:java}
> fut.completeExceptionally(new TimeoutException(timeoutObject.describe()));
> requestsMap.remove(entry.getKey(), timeoutObject);
> {code}
> Thus, the race is possible when first assertion is matches but the entry is
> still in map.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)