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

delete unstable tests and skip redis tests if the redis extension is not installed #78

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

godruoyi
Copy link
Owner

@godruoyi godruoyi commented Nov 22, 2024

This test has always been unstable here, we've directly deleted it and no longer recommend using the default RandomSequenceResolver. If you need to ensure your ID is unique, you might want to look at FileLockResolver.

public function test_batch_for_diff_instance_with_default_driver(): void
    {
        $ids = [];
        $count = 100_000; // 100k

        for ($i = 0; $i < $count; $i++) {
            $ids[(new Snowflake())->id()] = 1;
        }

        // This pattern will result in generating duplicate IDs.
        $this->assertGreaterThan(90000, count($ids));
    }

@godruoyi godruoyi merged commit eacdba1 into master Nov 22, 2024
6 checks passed
@godruoyi godruoyi deleted the godruoyi/skip-redis-test-when-extension-missing branch November 22, 2024 14:18
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.75%. Comparing base (dec895d) to head (7b8f18f).
Report is 6 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #78      +/-   ##
============================================
+ Coverage     98.71%   98.75%   +0.03%     
- Complexity       91       94       +3     
============================================
  Files             7        8       +1     
  Lines           234      240       +6     
============================================
+ Hits            231      237       +6     
  Misses            3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants