Files
mongo/buildscripts/resmokelib/testing/testcases/fsm_workload_test.py
Max Hirschhorn 03892c4032 SERVER-30203 Create FSMWorkloadTestCase for running concurrency tests.
Uses the jstests/concurrency/fsm_libs/resmoke_runner.js file to run an
individual FSM workload directly via resmoke.py.

These changes expose internals of jstests/concurrency/fsm_libs/runner.js
so that both versions of how the concurrency tests are executed by
resmoke.py remain possible for other suite configurations.
2018-03-08 16:52:06 -05:00

40 lines
1.1 KiB
Python

"""
unittest.TestCase for FSM workloads.
"""
from __future__ import absolute_import
from buildscripts.resmokelib import config
from buildscripts.resmokelib import core
from buildscripts.resmokelib import utils
from buildscripts.resmokelib.testing.testcases import jsrunnerfile
class FSMWorkloadTestCase(jsrunnerfile.JSRunnerFileTestCase):
"""An FSM workload to execute."""
REGISTERED_NAME = "fsm_workload_test"
def __init__(self,
logger,
fsm_workload,
shell_executable=None,
shell_options=None):
"""Initializes the FSMWorkloadTestCase with the FSM workload file."""
jsrunnerfile.JSRunnerFileTestCase.__init__(
self,
logger,
"FSM workload",
fsm_workload,
test_runner_file="jstests/concurrency/fsm_libs/resmoke_runner.js",
shell_executable=shell_executable,
shell_options=shell_options)
@property
def fsm_workload(self):
return self.test_name
def _populate_test_data(self, test_data):
test_data["fsmWorkloads"] = self.fsm_workload