Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix flaky test in SentinelConfigTest #1884

Closed
wants to merge 1 commit into from
Closed

Conversation

zcai2
Copy link
Contributor

@zcai2 zcai2 commented Dec 7, 2020

Fixed flaky test testDefaultConfig that caused by testColdFactoryLargerThanOne in SentinelConfigTest

If we run testColdFactoryLargerThanOne first, it will modify SentinelConfig.COLD_FACTOR.
Then when we run testDefaultConfig, the code assertEquals(SentinelConfig.DEFAULT_CHARSET, SentinelConfig.charset()) will have issue.

The flaky tests are found by running https://github.com/idflakies/iDFlakies

Describe how you did it:

Set a before and after method to set the variables to the default value.

@sczyh30 sczyh30 added the area/test Issue or PR related to test cases label Dec 14, 2020
@@ -19,6 +21,16 @@
*/
public class SentinelConfigTest {

@Before
public void setUp() {
SentinelConfig.setConfig(SentinelConfig.COLD_FACTOR, SentinelConfig.DEFAULT_CHARSET);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value should be DEFAULT_COLD_FACTOR.

@sczyh30
Copy link
Member

sczyh30 commented Dec 28, 2020

Any feedback?

@sczyh30
Copy link
Member

sczyh30 commented Jan 25, 2021

Closing the issue due to no further feedback.

@sczyh30 sczyh30 closed this Jan 25, 2021
CST11021 pushed a commit to CST11021/Sentinel that referenced this pull request Nov 3, 2021
…ipeWritePerm_desc

[ISSUE alibaba#1883] Doc error about admin tool WipeWritePermSubCommand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test Issue or PR related to test cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants