Conversation
Merge pull request !1075 from handy/handy
Merge pull request !1076 from summertime-wu/v5-dev
使用 contentEquals(app) 直接进行 char 数组比对,避免 equals(app.toString()) 中将 StringBuilder 转为 String,会多一道 char 数组拷贝
Merge pull request !1084 from summertime-wu/v5-dev
Merge pull request !1092 from flavormark/v5-dev
* Snowflake add method:根据传入时间戳-计算ID起终点 (gitee/issues/I60M14)
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Created this PR to fix 2 flaky tests namely
baseSynthesisAnnotationWorkTestwhich can be found here andgetMethodsFromInterfaceTestwhich can be found here.How was this test identified as flaky?
This test was identifies as flaky by using an open-source research tool named NonDex which is responsible for finding and diagnosing non-deterministic runtime exceptions in Java programs.
What do the tests do?
baseSynthesisAnnotationWorkTestIt focuses on verifying the functionality related to annotations and annotated elements. Specifically, it involves retrieving and manipulating annotations associated with various classes and elements. The test also assesses the behavior of certain extension methods, as well as attributes and processors related to synthesized annotations.
getMethodsFromInterfaceTestConfirms that when working with interfaces, calling
getMethodsdirectly retrieves all public methods. It obtains a total of four methods fromTestInterface1,TestInterface2, andTestInterface3. The test then verifies that the results are identical when usinggetPublicMethods.baseSynthesisAnnotationWorkTestfails because there is a mismatch in the order of thesynthesizedAnnotationswhich is obtained by calling thegetAnnotationsmethod and the expected order which ischildAnnotation,grandParentAnnotation,parentAnnotation.The error occurs here:
hutool/hutool-core/src/test/java/cn/hutool/core/annotation/GenericSynthesizedAggregateAnnotationTest.java
Line 39 in 20f0c72
getMethodsFromInterfaceTestfails because there is a mismatch in the order ofmethodsandpublicMethodswhich are obtained by calling thegetMethodsandgetPublicMethodsrespectively.The error occurs here:
hutool/hutool-core/src/test/java/cn/hutool/core/util/ReflectUtilTest.java
Line 230 in 20f0c72
This PR fixes
baseSynthesisAnnotationWorkTestby sorting thesynthesizedAnnotationsbefore comparing it with the expected order ofchildAnnotation,grandParentAnnotation,parentAnnotation.This PR fixes
getMethodsFromInterfaceTestby sorting bothmethodsandpublicMethodsbefore checking that they are equal.You can run the following commands to run the tests using NonDex tool:
(Optional) You can also run the following command to run the test:
Test Environment: