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

ChenXi updated HDDS-10070:
--------------------------
    Fix Version/s: 1.4.1

> Intermittent failure in TestWritableRatisContainerProvider
> ----------------------------------------------------------
>
>                 Key: HDDS-10070
>                 URL: https://issues.apache.org/jira/browse/HDDS-10070
>             Project: Apache Ozone
>          Issue Type: Sub-task
>          Components: test
>    Affects Versions: 1.5.0
>            Reporter: Attila Doroszlai
>            Assignee: Attila Doroszlai
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.5.0, 1.4.1
>
>
> {code:title=https://github.com/apache/ozone/actions/runs/7419743026/job/20190044910#step:5:1846}
> [INFO] Running 
> org.apache.hadoop.hdds.scm.pipeline.TestWritableRatisContainerProvider
> Error:  Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.478 
> s <<< FAILURE! -- in 
> org.apache.hadoop.hdds.scm.pipeline.TestWritableRatisContainerProvider
> Error:  
> org.apache.hadoop.hdds.scm.pipeline.TestWritableRatisContainerProvider.skipsPipelineWithoutContainer
>  -- Time elapsed: 0.022 s <<< ERROR!
> org.mockito.exceptions.misusing.PotentialStubbingProblem: 
> Strict stubbing argument mismatch. Please check:
>  - this invocation of 'getMatchingContainer' method:
>     containerManager.getMatchingContainer(
>     1234L,
>     "owner",
>     Pipeline[ Id: 8244fd7b-465e-48b1-ac54-695082044516, Nodes: 
> b7bc80dc-8029-4820-83e7-5277edd6ac81(localhost/127.0.0.1)02240a34-46aa-4773-a0db-ec3943f65802(localhost/127.0.0.1)702a7f57-8886-48fd-b8a6-8d37cb88d512(localhost/127.0.0.1),
>  ReplicationConfig: STANDALONE/ONE, State:OPEN, leaderId:, 
> CreationTimestamp2024-01-05T09:19:58.788Z[Etc/UTC]],
>     []
> );
>     -> at 
> org.apache.hadoop.hdds.scm.pipeline.WritableRatisContainerProvider.selectContainer(WritableRatisContainerProvider.java:193)
>  - has following stubbing(s) with different arguments:
>     1. containerManager.getMatchingContainer(
>     1234L,
>     "owner",
>     Pipeline[ Id: 3bd8eb19-1027-4264-8a15-24f3cdc7505e, Nodes: 
> fa68b3bd-5785-4bac-b779-5a0464d16ed5(localhost/127.0.0.1)fc44d7ed-99f0-4e58-890d-588632a38b22(localhost/127.0.0.1)e094cb41-8755-4cae-8fed-a75dba863353(localhost/127.0.0.1),
>  ReplicationConfig: STANDALONE/ONE, State:OPEN, leaderId:, 
> CreationTimestamp2024-01-05T09:19:58.787Z[Etc/UTC]],
>     []
> );
>       -> at 
> org.apache.hadoop.hdds.scm.pipeline.TestWritableRatisContainerProvider.pipelineHasContainer(TestWritableRatisContainerProvider.java:132)
> Typically, stubbing argument mismatch indicates user mistake when writing 
> tests.
> Mockito fails early so that you can debug potential problem easily.
> However, there are legit scenarios when this exception generates false 
> negative signal:
>   - stubbing the same method multiple times using 'given().will()' or 
> 'when().then()' API
>     Please use 'will().given()' or 'doReturn().when()' API for stubbing.
>   - stubbed method is intentionally invoked with different arguments by code 
> under test
>     Please use default or 'silent' JUnit Rule (equivalent of 
> Strictness.LENIENT).
> For more information see javadoc for PotentialStubbingProblem class.
>       at 
> org.apache.hadoop.hdds.scm.pipeline.WritableRatisContainerProvider.selectContainer(WritableRatisContainerProvider.java:193)
>       at 
> org.apache.hadoop.hdds.scm.pipeline.WritableRatisContainerProvider.getContainer(WritableRatisContainerProvider.java:163)
>       at 
> org.apache.hadoop.hdds.scm.pipeline.WritableRatisContainerProvider.getContainer(WritableRatisContainerProvider.java:92)
>       at 
> org.apache.hadoop.hdds.scm.pipeline.TestWritableRatisContainerProvider.skipsPipelineWithoutContainer(TestWritableRatisContainerProvider.java:91)
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to