Opentelemetry-js: Flaky test case 'Node SDK > Basic Registration > should register a tracer provider if a span processor is provided'

Created on 3 Aug 2020  路  2Comments  路  Source: open-telemetry/opentelemetry-js

What version of Node are you using?

Node v12.

What did you see instead?

Circle CI: https://app.circleci.com/pipelines/github/open-telemetry/opentelemetry-js/4901/workflows/287a9bd4-99fc-43c5-b1ce-1d340c8f7798/jobs/26727

  1) Node SDK
       Basic Registration
         should register a tracer provider if a span processor is provided:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/root/project/packages/opentelemetry-sdk-node/test/sdk.test.ts)

Affected PR

bug

Most helpful comment

This test is flaky because the plugin loading is taking too long. Even on my local machine, the test frequently takes longer than 1000ms. In a CI environment with limited resources, the 2000ms limit is exceeded often. This is not a problem in the other tests because the node tracer provider isn't loaded for each test.

I think the plugin system needs a drastic overhaul. Managing a list of plugins to autoload is cumbersome, the fact that a single plugin cannot instrument two modules can be a pain (as is the case with http/https and grpc/grpc-js, and would be similar with mysql/mysql2 if we supported mysql2), and plugin configuration is awkward.

All 2 comments

This test is flaky because the plugin loading is taking too long. Even on my local machine, the test frequently takes longer than 1000ms. In a CI environment with limited resources, the 2000ms limit is exceeded often. This is not a problem in the other tests because the node tracer provider isn't loaded for each test.

I think the plugin system needs a drastic overhaul. Managing a list of plugins to autoload is cumbersome, the fact that a single plugin cannot instrument two modules can be a pain (as is the case with http/https and grpc/grpc-js, and would be similar with mysql/mysql2 if we supported mysql2), and plugin configuration is awkward.

Flaky test fixed in #1398

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maxmil7 picture maxmil7  路  5Comments

amarflybot18 picture amarflybot18  路  3Comments

carlosalberto picture carlosalberto  路  3Comments

backkem picture backkem  路  6Comments

BowlingX picture BowlingX  路  6Comments