Skip to content

Commit 3407867

Browse files
check no rollback spans when option disabled
1 parent a0579ad commit 3407867

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/integrations/django/test_db_transactions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ def test_db_transaction_spans_disabled_no_autocommit(
146146
sqlite_commit["spans"],
147147
)
148148
if span["data"].get(SPANDATA.DB_OPERATION) == DBOPERATION.COMMIT
149+
or span["data"].get(SPANDATA.DB_OPERATION) == DBOPERATION.ROLLBACK
149150
]
150151
assert len(commit_spans) == 0
151152

@@ -263,6 +264,7 @@ def test_db_transaction_spans_disabled_atomic(sentry_init, client, capture_event
263264
sqlite_commit["spans"],
264265
)
265266
if span["data"].get(SPANDATA.DB_OPERATION) == DBOPERATION.COMMIT
267+
or span["data"].get(SPANDATA.DB_OPERATION) == DBOPERATION.ROLLBACK
266268
]
267269
assert len(commit_spans) == 0
268270

0 commit comments

Comments
 (0)