Skip to content

Add waitAndAssertLogRecords to InstrumentationTestRunner#16052

Merged
laurit merged 1 commit into
open-telemetry:mainfrom
trask:exceptions-test-runner
Jan 29, 2026
Merged

Add waitAndAssertLogRecords to InstrumentationTestRunner#16052
laurit merged 1 commit into
open-telemetry:mainfrom
trask:exceptions-test-runner

Conversation

@trask

@trask trask commented Jan 29, 2026

Copy link
Copy Markdown
Member

Better follows the pattern of spans and metrics, and needed for #16049 to be able to assert on logs directly from InstrumentationTestRunner.

@trask trask force-pushed the exceptions-test-runner branch from 450a366 to a7d9b0a Compare January 29, 2026 04:29
@trask trask marked this pull request as ready for review January 29, 2026 05:16
@trask trask requested a review from a team as a code owner January 29, 2026 05:16
assertions.forEach(assertionsList::add);

List<LogRecordData> logRecordDataList = waitForLogRecords(assertionsList.size());
Iterator<Consumer<LogRecordDataAssert>> assertionIterator = assertionsList.iterator();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially thought that there should be awaitUntilAsserted like in metrics and trace assertions but it really isn't needed since we know how many log records are needed.

@laurit laurit merged commit f6ceb55 into open-telemetry:main Jan 29, 2026
85 checks passed
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