[ 
https://issues.apache.org/jira/browse/IGNITE-25856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18004190#comment-18004190
 ] 

Roman Puchkovskiy commented on IGNITE-25856:
--------------------------------------------

The patch looks good to me

> Fix flaky 
> ItIndexNodeFinishedRwTransactionsCheckerTest#testOnePhaseCommitViaKeyValue
> ------------------------------------------------------------------------------------
>
>                 Key: IGNITE-25856
>                 URL: https://issues.apache.org/jira/browse/IGNITE-25856
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Kirill Tkalenko
>            Assignee: Kirill Tkalenko
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.1
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> We need to investigate the reason for the 
> *org.apache.ignite.internal.index.ItIndexNodeFinishedRwTransactionsCheckerTest#testOnePhaseCommitViaKeyValue*
>  flaky and fix it.
> [TC|https://ci.ignite.apache.org/project.html?projectId=ApacheIgnite3xGradle_Test_IntegrationTests&buildTypeId=&tab=testDetails&testNameId=-5515569723603310412&order=TEST_STATUS_DESC&branch_ApacheIgnite3xGradle_Test_IntegrationTests=__all_branches__&itemsCount=50]
>  history.
> {noformat}
> java.lang.AssertionError: java.util.concurrent.TimeoutException
>       at 
> org.apache.ignite.internal.testframework.matchers.CompletableFutureMatcher.matchesSafely(CompletableFutureMatcher.java:78)
>       at 
> org.apache.ignite.internal.testframework.matchers.CompletableFutureMatcher.matchesSafely(CompletableFutureMatcher.java:35)
>       at org.hamcrest.TypeSafeMatcher.matches(TypeSafeMatcher.java:83)
>       at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:10)
>       at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
>       at 
> org.apache.ignite.internal.index.ItIndexNodeFinishedRwTransactionsCheckerTest.testOnePhaseCommitViaKeyValue(ItIndexNodeFinishedRwTransactionsCheckerTest.java:195)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:568)
>       at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
>       at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
> Caused by: java.util.concurrent.TimeoutException
>       at 
> java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1960)
>       at 
> java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2095)
>       at 
> org.apache.ignite.internal.testframework.matchers.CompletableFutureMatcher.matchesSafely(CompletableFutureMatcher.java:74)
>       ... 8 more
> {noformat}
> Other:
> {noformat}
> org.mockito.exceptions.misusing.UnfinishedStubbingException: 
> Unfinished stubbing detected here:
> -> at 
> org.apache.ignite.internal.index.ItIndexNodeFinishedRwTransactionsCheckerTest.awaitAddWriteCommittedForAnyMvPartitionStorage(ItIndexNodeFinishedRwTransactionsCheckerTest.java:295)
> E.g. thenReturn() may be missing.
> Examples of correct stubbing:
>     when(mock.isOk()).thenReturn(true);
>     when(mock.isOk()).thenThrow(exception);
>     doThrow(exception).when(mock).someVoidMethod();
> Hints:
>  1. missing thenReturn()
>  2. you are trying to stub a final method, which is not supported
>  3. you are stubbing the behaviour of another mock inside before 'thenReturn' 
> instruction is completed, possibly on another thread
>       at 
> app//org.apache.ignite.internal.storage.impl.TestMvPartitionStorage.addWriteCommitted(TestMvPartitionStorage.java:346)
>       at 
> app//org.apache.ignite.internal.index.ItIndexNodeFinishedRwTransactionsCheckerTest.awaitAddWriteCommittedForAnyMvPartitionStorage(ItIndexNodeFinishedRwTransactionsCheckerTest.java:301)
>       at 
> app//org.apache.ignite.internal.index.ItIndexNodeFinishedRwTransactionsCheckerTest.testOnePhaseCommitViaKeyValue(ItIndexNodeFinishedRwTransactionsCheckerTest.java:185)
>       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)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to