Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-25401

Add Random.choice() method to the shell

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Shell
    • Labels:
    • Server Tooling & Methods
    • Platforms 2016-08-26

      There are many tests that do random selections from arrays, or write helper functions to do so for them. We should add a Random.choice() to remove the need for all these custom helpers.

      Name chosen to match python's random.choice, but I don't really care what the name is.

      Examples of places that could benefit from such functionality:

      1. jstests/noPassthrough/geo_full.js
      2. jstests/aggregation/sources/facet/use_cases.js
      3. jstests/concurrency/fsm_workloads/indexed_insert_text.js

            Assignee:
            backlog-server-stm Backlog - Server Tooling and Methods (STM) (Inactive)
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: