Skip to content

Commit 98c0bf6

Browse files
committed
updated test
1 parent 6256765 commit 98c0bf6

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

tests/integrations/openfeature/test_openfeature.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ def task(flag):
6363
client.get_boolean_value(flag, default_value=False)
6464
# use a tag to identify to identify events later on
6565
sentry_sdk.set_tag("task_id", flag)
66-
sentry_sdk.capture_exception(Exception("something wrong!"))
66+
sentry_sdk.capture_exception(
67+
Exception(f"something wrong with task {flag}!")
68+
)
6769

6870
# Run tasks in separate threads
6971
with cf.ThreadPoolExecutor(max_workers=2) as pool:

tests/integrations/statsig/test_statsig.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ def task(flag_key):
7070
statsig.check_gate(user, flag_key)
7171
# use a tag to identify to identify events later on
7272
sentry_sdk.set_tag("task_id", flag_key)
73-
sentry_sdk.capture_exception(Exception("something wrong!"))
73+
sentry_sdk.capture_exception(
74+
Exception(f"something wrong with task {flag_key}!")
75+
)
7476

7577
with cf.ThreadPoolExecutor(max_workers=2) as pool:
7678
pool.map(task, ["world", "other"])

tests/integrations/unleash/test_unleash.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ def task(flag_key):
5151
client.is_enabled(flag_key)
5252
# use a tag to identify to identify events later on
5353
sentry_sdk.set_tag("task_id", flag_key)
54-
sentry_sdk.capture_exception(Exception("something wrong!"))
54+
sentry_sdk.capture_exception(
55+
Exception(f"something wrong with task {flag_key}!")
56+
)
5557

5658
# Capture an eval before we split isolation scopes.
5759
client.is_enabled("hello")

tests/test_feature_flags.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ def task(flag_key):
104104
add_feature_flag(flag_key, False)
105105
# use a tag to identify to identify events later on
106106
sentry_sdk.set_tag("task_id", flag_key)
107-
sentry_sdk.capture_exception(Exception("something wrong!"))
107+
sentry_sdk.capture_exception(
108+
Exception(f"something wrong with task {flag_key}!")
109+
)
108110

109111
# Run tasks in separate threads
110112
with cf.ThreadPoolExecutor(max_workers=2) as pool:

0 commit comments

Comments
 (0)