Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(observability): fix bugs found from product review + negative cases #2158

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
De-flake EndToEnd Database.runStream test with by ignoring grpc.CANCE…
…LLED
  • Loading branch information
odeke-em committed Oct 24, 2024
commit 13cc5092ff9e2a4c5e251c01726ee4e657ec9972
12 changes: 11 additions & 1 deletion observability-test/spanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ describe('EndToEnd', () => {

afterEach(async () => {
await tracerProvider.forceFlush();
await tracerProvider.shutdown();
traceExporter.reset();
spannerMock.resetRequests();
spanner.close();
Expand Down Expand Up @@ -323,7 +324,16 @@ describe('EndToEnd', () => {
database
.runStream('SELECT 1')
.on('data', row => {})
.on('error', assert.ifError)
.on('error', err => {
// De-flake by ignoring grpc.status.CANCELLED as we've
// seen on the Github test runners, due to timing.
const grpcErr = err as grpc.ServiceError;
if (!grpcErr) {
assert.ifError(err);
} else if (grpcErr.code != grpc.status.CANCELLED) {
assert.ifError(err);
}
})
.on('end', () => {
traceExporter.forceFlush();
const spans = traceExporter.getFinishedSpans();
Expand Down