From 2ca24594144253afa2bf7ee172bbfe1a1c58969d Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Mon, 26 Aug 2024 04:35:42 -0700 Subject: [PATCH] test(exporter-logs-otlp-grpc): improve error reporting in particular test failure (#4953) --- .../test/OTLPLogExporter.test.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/experimental/packages/exporter-logs-otlp-grpc/test/OTLPLogExporter.test.ts b/experimental/packages/exporter-logs-otlp-grpc/test/OTLPLogExporter.test.ts index 35cc083ccc..a0d3c7eb66 100644 --- a/experimental/packages/exporter-logs-otlp-grpc/test/OTLPLogExporter.test.ts +++ b/experimental/packages/exporter-logs-otlp-grpc/test/OTLPLogExporter.test.ts @@ -109,12 +109,17 @@ const testCollectorExporter = (params: TestParams) => { server.bindAsync( serverAddr.protocol === 'https:' ? serverAddr.host : address, credentials, - () => { - server.start(); - done(); + err => { + if (err) { + done(err); + } else { + server.start(); + done(); + } } ); - }); + }) + .catch(done); }); after(() => {