Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request synchronizes the resetActiveTracingFramework method in SpannerOptions and introduces teardown resets across various test classes to prevent tracing state leakage. The review feedback suggests using nested try-finally blocks in IntegrationTestEnv.after() to ensure all cleanup steps execute even if one fails, and defensively resetting the active tracing framework in @BeforeClass setup methods to avoid failures from state leakage of preceding tests.
c8f7f64 to
c399f93
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request synchronizes the resetActiveTracingFramework method in SpannerOptions and updates various test suites to ensure the active tracing framework is properly reset during setup or teardown (often using @AfterClass or within finally blocks). The review feedback correctly identifies redundant @AfterClass teardown methods in ResumableStreamIteratorTest and GapicSpannerRpcTest, as their respective @After methods already handle resetting the active tracing framework after every test case.
Several tests configure OpenTelemetry tracing globally during execution. Without explicit teardown, this configuration persists across tests in the same test run and causes subsequent tests that expect the default tracing behavior to fail or behave inconsistently. This change ensures that all tests enabling a custom tracing framework cleanly restore the default tracing state when they finish. Teardown routines are guarded so that unrelated errors during cleanup cannot bypass the reset, and tests defensively clear any preexisting state before enabling custom tracing.
c399f93 to
f2b29fd
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request synchronizes the resetActiveTracingFramework method in SpannerOptions to ensure thread safety. Additionally, it updates various test classes to consistently reset the active tracing framework during teardown or setup phases, preventing state leakage between tests. There are no review comments to address, and the changes look solid.
Several tests configure OpenTelemetry tracing globally during execution. Without explicit teardown, this configuration persists across tests in the same test run and causes subsequent tests that expect the default tracing behavior to fail or behave inconsistently.
This change ensures that all tests enabling a custom tracing framework cleanly restore the default tracing state when they finish. Teardown routines are guarded so that unrelated errors during cleanup cannot bypass the reset, and tests defensively clear any preexisting state before enabling custom tracing.