Random seed based tests are not deterministic on windows

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.1.1
    • Affects Version/s: None
    • Component/s: Testing Infrastructure
    • None
    • Windows
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      On windows the random seed is not used

              BSONObj JSRand( const BSONObj &a, void* data ) {
                  uassert( 12519, "rand accepts no arguments", a.nFields() == 0 );
                  unsigned r;
      #if !defined(_WIN32)
                  r = rand_r( &_randomSeed );
      #else
                  r = rand(); // seed not used in this case
      #endif
                  return BSON( "" << double( r ) / ( double( RAND_MAX ) + 1 ) );
              }
      

            Assignee:
            Tad Marshall
            Reporter:
            Aaron Staple (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: