We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78d3a57 commit a6e13e2Copy full SHA for a6e13e2
pytest_splunk_addon/splunk.py
@@ -771,8 +771,12 @@ def splunk_events_cleanup(request, splunk_search_util):
771
772
"""
773
if request.config.getoption("splunk_cleanup"):
774
- LOGGER.info("Running the old events cleanup")
775
- splunk_search_util.deleteEventsFromIndex()
+ if (
+ "PYTEST_XDIST_WORKER" not in os.environ
776
+ or os.environ.get("PYTEST_XDIST_WORKER") == "gw0"
777
+ ):
778
+ LOGGER.info("Running the old events cleanup")
779
+ splunk_search_util.deleteEventsFromIndex()
780
else:
781
LOGGER.info("Events cleanup was disabled.")
782
0 commit comments