You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/11/14 23:31:38 UTC

[GitHub] [iotdb] alany9552 opened a new pull request #4383: Fixed 5 flaky tests

alany9552 opened a new pull request #4383:
URL: https://github.com/apache/iotdb/pull/4383


   ## Description
   Fixed 5 flaky tests causes by non-deterministic results using `HashMap`
   
   ### Flaky tests and root causes
   Folllowing tests are flaky and failing:
   ```
   org.apache.iotdb.tsfile.read.controller.IMetadataQuerierByFileImplTest.testConvert1
   org.apache.iotdb.tsfile.read.controller.IMetadataQuerierByFileImplTest.testConvert2
   org.apache.iotdb.tsfile.read.ReadInPartitionTest.test1
   org.apache.iotdb.tsfile.read.ReadInPartitionTest.test2
   org.apache.iotdb.tsfile.read.ReadInPartitionTest.test3
   ```
   when running
   `mvn -pl cluster edu.illinois:nondex-maven-plugin:1.1.2:nondex -Dtest=*TESTNAME*`
   
   The reason is because it uses `HashMap` when declaring `groupWriters` which is non-deterministic and mess up the orders. 
   ### How to fix and results
   Using LinkedHashMap will solve this problem and produce deterministic results which won't fail the test.
   After changing, all tests pass.
   
   ### Error Log
   ```
   [ERROR] Failures:
   [ERROR]   IMetadataQuerierByFileImplTest.testConvert2:148 expected:<[[( 148056261804]0 : 1480562618045 ]]> but was:<[[[ 148056261800]0 : 1480562618045 ]]>
   ```
   
   
   <!--
   In each section, please describe design decisions made, including:
    - Choice of algorithms
    - Behavioral aspects. What configuration values are acceptable? How are corner cases and error 
       conditions handled, such as when there are insufficient resources?
    - Class organization and design (how the logic is split between classes, inheritance, composition, 
       design patterns)
    - Method organization and design (how the logic is split between methods, parameters and return types)
    - Naming (class, method, API, configuration, HTTP endpoint, names of emitted metrics)
   -->
   
   
   <!-- It's good to describe an alternative design (or mention an alternative name) for every design 
   (or naming) decision point and compare the alternatives with the designs that you've implemented 
   (or the names you've chosen) to highlight the advantages of the chosen designs and names. -->
   
   <!-- If there was a discussion of the design of the feature implemented in this PR elsewhere 
   (e. g. a "Proposal" issue, any other issue, or a thread in the development mailing list), 
   link to that discussion from this PR description and explain what have changed in your final design 
   compared to your original proposal or the consensus version in the end of the discussion. 
   If something hasn't changed since the original discussion, you can omit a detailed discussion of 
   those aspects of the design here, perhaps apart from brief mentioning for the sake of readability 
   of this PR description. -->
   
   <!-- Some of the aspects mentioned above may be omitted for simple and small changes. -->
   
   <hr>
   
   This PR has:
   - [X] been self-reviewed.
       - [X] concurrent read
       - [X] concurrent write
       - [X] concurrent read and write 
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods. 
   - [ ] added or updated version, __license__, or notice information
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious 
     for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold 
     for code coverage.
   - [ ] added integration tests.
   - [ ] been tested in a test IoTDB cluster.
   
   <!-- Check the items by putting "x" in the brackets for the done things. Not all of these items 
   apply to every PR. Remove the items which are not done or not relevant to the PR. None of the items 
   from the checklist above are strictly necessary, but it would be very helpful if you at least 
   self-review the PR. -->
   
   <hr>
   
   ##### Key changed/added classes (or packages if there are too many classes) in this PR
   **org.apache.iotdb.tsfile.read.controller.IMetadataQuerierByFileImplTest**
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] HTHou commented on a change in pull request #4383: Fixed 5 flaky tests

Posted by GitBox <gi...@apache.org>.
HTHou commented on a change in pull request #4383:
URL: https://github.com/apache/iotdb/pull/4383#discussion_r769219948



##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/write/TsFileWriter.java
##########
@@ -45,8 +45,8 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;

Review comment:
       ```suggestion
   import java.util.LinkedHashMap;
   import java.util.List;
   import java.util.Map;
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] alany9552 commented on pull request #4383: Fixed 5 flaky tests

Posted by GitBox <gi...@apache.org>.
alany9552 commented on pull request #4383:
URL: https://github.com/apache/iotdb/pull/4383#issuecomment-981172389


   > Hi @alany9552 , can you fix the conflicts of this PR? (you can omit CI failure of E2E Tests now).
   
   I have already fixed the conflict. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] alany9552 commented on pull request #4383: Fixed 5 flaky tests

Posted by GitBox <gi...@apache.org>.
alany9552 commented on pull request #4383:
URL: https://github.com/apache/iotdb/pull/4383#issuecomment-986474021


   @HTHou Hi, thanks for reminding. I have fixed the format violations.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] jixuan1989 commented on pull request #4383: Fixed 5 flaky tests

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on pull request #4383:
URL: https://github.com/apache/iotdb/pull/4383#issuecomment-975324073


   Hi @alany9552 , can you fix the conflicts of this PR? (you can omit CI failure of E2E Tests now).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] alany9552 commented on pull request #4383: Fixed 5 flaky tests

Posted by GitBox <gi...@apache.org>.
alany9552 commented on pull request #4383:
URL: https://github.com/apache/iotdb/pull/4383#issuecomment-981297053


   Hi @jixuan1989 I have already fixed the conflicts, could you please check my PR?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] alany9552 removed a comment on pull request #4383: Fixed 5 flaky tests

Posted by GitBox <gi...@apache.org>.
alany9552 removed a comment on pull request #4383:
URL: https://github.com/apache/iotdb/pull/4383#issuecomment-981172389


   > Hi @alany9552 , can you fix the conflicts of this PR? (you can omit CI failure of E2E Tests now).
   
   I have already fixed the conflict. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls commented on pull request #4383: Fixed 5 flaky tests

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #4383:
URL: https://github.com/apache/iotdb/pull/4383#issuecomment-986504280


   
   [![Coverage Status](https://coveralls.io/builds/44774832/badge)](https://coveralls.io/builds/44774832)
   
   Coverage decreased (-0.07%) to 67.238% when pulling **1779aaa40d65d23b1c4e1ff54eebe0002472850e on alany9552:flaky_tsfile** into **521f5626297e834049e8f8af94bac09ede3b8143 on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] alany9552 commented on pull request #4383: Fixed 5 flaky tests

Posted by GitBox <gi...@apache.org>.
alany9552 commented on pull request #4383:
URL: https://github.com/apache/iotdb/pull/4383#issuecomment-981171458


   > Hi @alany9552 , can you fix the conflicts of this PR? (you can omit CI failure of E2E Tests now).
   
   Sure I will try to work on this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] HTHou commented on pull request #4383: Fixed 5 flaky tests

Posted by GitBox <gi...@apache.org>.
HTHou commented on pull request #4383:
URL: https://github.com/apache/iotdb/pull/4383#issuecomment-986371712


   Hi, Plz Run 'mvn spotless:apply' to fix the format violations.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org