Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions st2common/tests/unit/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def test_check_connect(self):
def test_network_level_compression(self):
disconnect()

# db is not modified in this test, so this is safe to run in parallel.
db_name = "st2"
db_host = "localhost"
db_port = 27017
Expand Down Expand Up @@ -521,6 +522,7 @@ def test_db_connect_server_selection_timeout_ssl_on_non_ssl_listener(self):
# and propagating the error
disconnect()

# db is not modified in this test, so this is safe to run in parallel.
db_name = "st2"
db_host = "localhost"
db_port = 27017
Expand Down
4 changes: 3 additions & 1 deletion st2tests/st2tests/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ def _register_config_opts():


def _override_db_opts():
CONF.set_override(name="db_name", override="st2-test", group="database")
# use separate dbs for safer parallel test runs
db_name = f"st2-test{os.environ.get('ST2TESTS_PARALLEL_SLOT', '')}"
CONF.set_override(name="db_name", override=db_name, group="database")
CONF.set_override(name="host", override="127.0.0.1", group="database")


Expand Down