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

Proposed fix for #1183 - multiple regex within short time might give identical strings #1187

Merged
merged 5 commits into from
Jul 8, 2020
Merged

Commits on Jun 30, 2020

  1. Proposed fix for #1183 - creating multiple regex within short time mi…

    …ght yield identical stringsr #1183 (+1 squashed commits)
    
    Squashed commits:
    
    [e8e3387] Proposed fix for #1183 - creating multiple regex within short time might yield identical strings
    Magnus Mikkelsen authored and MagnusMikkelsen committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    02f6b7c View commit details
    Browse the repository at this point in the history
  2. Update Src/AutoFixtureUnitTest/RegularExpressionGeneratorTest.cs

    Co-authored-by: Nikos Baxevanis <nikos.baxevanis@gmail.com>
    MagnusMikkelsen and moodmosaic committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    66b75d7 View commit details
    Browse the repository at this point in the history
  3. Suggestions from codereview:

    Added a test to FixtureTests, to verify that #1183 is fixed as suggested here: #1187 (comment)
    
    This required making sure that the outcome space of the regex pattern is great enough. Xeger seems to favor shorter strings, and this gave collisions when generating RegularExpressionValidatedType . So minimum length of the pattern in this type was lengthened from 1 to 20.
    
    Removed assertion roulette in RegularExpressionGeneratorTests.CreateMultipleWithRegularExpressionRequestReturnsDifferentResults(...)
    according to suggestion: #1187 (comment)
    MagnusMikkelsen committed Jun 30, 2020
    Configuration menu
    Copy the full SHA
    04e0a62 View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2020

  1. To avoid concurrency issues with a shared Random, Random for Xeger is…

    … now only shared on each thread.
    MagnusMikkelsen committed Jul 6, 2020
    Configuration menu
    Copy the full SHA
    62ef345 View commit details
    Browse the repository at this point in the history
  2. alternative without added complexity of threadlocal and disposable - …

    …and with room for future perf improvement 😊
    MagnusMikkelsen committed Jul 6, 2020
    Configuration menu
    Copy the full SHA
    cc692c6 View commit details
    Browse the repository at this point in the history