Query data generator: automatically find and test new specs in directory

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Request from philip.stoev@mongodb.com in https://github.com/10gen/mongo/pull/43623: In jstests/noPassthroughWithMongod/query/data_generator_integration.js,
      use a glob to find all files in src/mongo/db/query/benchmark/data_generator/specs to prevent new files in that directory from not being tested.

      The thing is that a spec file may define multiple dataclasses, and the glob would not be able to figure out which one to run.

      I think it would be necessary to enable the data generator to creates collections for all the dataclasses in a spec file. This probably has to be set as a test mode because the data generator intended to be used by a human specifying a particular glob.

      Alternatively, the test could glob to find all files in src/mongo/db/query/benchmark/data_generator/specs, and fail the test if any file is not in the list of files to test.

      Another thing to consider is that originally, spec files are intended to live with the test that they belong to instead of living with the data generator.

            Assignee:
            Unassigned
            Reporter:
            Andi Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: