Skip to content

Commit

Permalink
make tagging instance level, not class level
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfiola committed Feb 25, 2024
1 parent ec7988e commit c6ddccc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/grasshopper/lib/journeys/base_journey.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ class BaseJourney(HttpUser):
_incoming_test_parameters = {}
abstract = True
base_torn_down = False
tags = {}
defaults = {"tags": tags, "thresholds": {}}
defaults = {"thresholds": {}}

@classmethod
@property
Expand Down Expand Up @@ -72,8 +71,7 @@ def reset_class_attributes(cls):
is provided as a way to reset to the starting state.
"""
cls._incoming_test_parameters = {}
cls.tags = {}
cls.defaults = {"tags": cls.tags}
cls.defaults = {"thresholds": {}, "tags": {}}
cls.host = ""
cls.abstract = True
cls.base_torn_down = False
Expand All @@ -94,6 +92,9 @@ def on_start(self):
self._register_new_vu()
self._set_thresholds()
self.environment.host = self.scenario_args.get("target_url", "") or self.host

self.tags = {}
self.defaults["tags"] = self.tags
self.update_tags({"environment": self.environment.host})

# TODO: currently global iterations is stored in the environment stats object
Expand Down

0 comments on commit c6ddccc

Please sign in to comment.