[SERVER-31503] Make JSONSchemaTestCase in resmoke.py more generic Created: 10/Oct/17 Updated: 30/Oct/23 Resolved: 08/Mar/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Testing Infrastructure |
| Affects Version/s: | 3.5.13 |
| Fix Version/s: | 3.7.3 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Robert Guo (Inactive) | Assignee: | Max Hirschhorn |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | TIG 2018-03-12, TIG 2018-03-26 |
| Participants: |
| Description |
|
The generational fuzzer test suites (and future FSM suites) can benefit from using the same model as the json schema tests of loading a JS test runner and passing in test files through TestData that the test runner can then use. The main change is to rename the JSONSchemaTestCase (and related code) into something more generic, like JSRunnerTestCase. I think the only piece of logic change that is required is to have TEST_RUNNER_FILE be passed in, through the suite configuration, instead of being hard-coded. |
| Comments |
| Comment by Githook User [ 08/Mar/18 ] |
|
Author: {'email': 'max.hirschhorn@mongodb.com', 'name': 'Max Hirschhorn', 'username': 'visemet'}Message: This reduces the amount of duplicate code when writing another TestCase |
| Comment by Max Hirschhorn [ 10/Oct/17 ] |
|
Are we also going to force TestCase classes that use a fixed runner file to use the same TestData parameter of how that filename gets passed? I'm worried that we'll end up forcing both RollbackFuzzerTestCase and JSONSchemaTestCase to be the same "test_kind" and then find that we want to configure them slightly differently. That is to say, perhaps the configure() method should still need to be filled in for both, even if they currently would have the same contents. |
| Comment by Robert Guo (Inactive) [ 10/Oct/17 ] |
|
max.hirschhorn I don't think this ticket is directly related to the rollback fuzzer. The rollback fuzzer, as is written, is a JSTestCase; there's no need for a separate RollbackTestCase in resmoke. If there were to be a RollbackTestCase, we'd basically be copying the JSONSChemaTestCase and renaming the variables in there anyway. So it's almost certainly going to be less work to just do the rename in-place. |
| Comment by Max Hirschhorn [ 10/Oct/17 ] |
|
I think we could defer deduplicating the logic that would go into writing a RollbackFuzzerTestCase and the existing JSONSchemaTestCase class. |