You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexander Lapin (Jira)" <ji...@apache.org> on 2025/11/04 15:40:00 UTC

[jira] [Assigned] (IGNITE-26931) TimeoutWorkerTest.testTimeout is flaky

     [ https://issues.apache.org/jira/browse/IGNITE-26931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Lapin reassigned IGNITE-26931:
----------------------------------------

    Assignee: Alexander Lapin

> TimeoutWorkerTest.testTimeout is flaky
> --------------------------------------
>
>                 Key: IGNITE-26931
>                 URL: https://issues.apache.org/jira/browse/IGNITE-26931
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Alexander Lapin
>            Assignee: 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 java.base@17.0.6/java.lang.reflect.Method.invoke(Method.java:568)
>         at java.base@17.0.6/java.util.ArrayList.forEach(ArrayList.java:1511)
>         at java.base@17.0.6/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)