Skip to content

test: Respect context manager lifecycles in fake_record_sql_queries#6295

Merged
alexander-alderman-webb merged 1 commit into
masterfrom
webb/fake-record-sql-queries
May 19, 2026
Merged

test: Respect context manager lifecycles in fake_record_sql_queries#6295
alexander-alderman-webb merged 1 commit into
masterfrom
webb/fake-record-sql-queries

Conversation

@alexander-alderman-webb
Copy link
Copy Markdown
Contributor

@alexander-alderman-webb alexander-alderman-webb commented May 19, 2026

Description

In the static trace lifecycle, set span.start_timestamp and span.timestamp immediately after __enter__ and __exit__ are called, respectively.

In the streaming trace lifecycle, set bothspan._start_timestam and span._end_timestamp immediately after __enter__ is called, as the query source is added inside the context manager. Then reset span._end_timestamp immediately before __exit__, as otherwise the span is not captured.

Issues

Reminders

@alexander-alderman-webb alexander-alderman-webb changed the title test: Respect context manager lifecycles in fake_record_sql_queries() test: Respect context manager lifecycles in fake_record_sql_queries May 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

Codecov Results 📊

282 passed | Total: 282 | Pass Rate: 100% | Execution Time: 42.98s

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 14858 uncovered lines.


Generated by Codecov Action

@alexander-alderman-webb alexander-alderman-webb marked this pull request as ready for review May 19, 2026 13:41
@alexander-alderman-webb alexander-alderman-webb requested a review from a team as a code owner May 19, 2026 13:41
@alexander-alderman-webb alexander-alderman-webb merged commit 9594a8c into master May 19, 2026
157 checks passed
@alexander-alderman-webb alexander-alderman-webb deleted the webb/fake-record-sql-queries branch May 19, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants