RuntimeTools / appmetrics

Node Application Metrics provides a foundational infrastructure for collecting resource and performance monitoring data for Node.js-based applications.
https://developer.ibm.com/open/node-application-metrics/
Apache License 2.0
974 stars 125 forks source link

skip travis test-coverage bug #578

Closed rwalle61 closed 5 years ago

rwalle61 commented 5 years ago

Context

Travis tests have been failing (https://travis-ci.org/RuntimeTools/appmetrics/builds) since February (https://travis-ci.org/RuntimeTools/appmetrics/builds/503060787). We only just started looking at why when updating Appmetrics to run on Node 12 (https://github.com/RuntimeTools/appmetrics/issues/572).

Error report

The error is:

# Subtest: tests/require_tests.js
[Tue May 28 11:05:50 2019] com.ibm.diagnostics.healthcenter.loader INFO: Node Application Metrics 4.0.1.201905281104 (Agent Core 3.2.9)
    # Subtest: Calling require without start should not break
        not ok 1 - Cannot read property 'f' of undefined
          ---
          stack: |
            TypeError:
                Object.<anonymous> (probes/trace-probe.js:15:109)
                Object.<anonymous> (probes/trace-probe.js:1)
                Object.replacementCompile (node_modules/append-transform/index.js:58:13)
                Generator.next (<anonymous>)
          type: TypeError
          tapCaught: testFunctionThrow
          test: Calling require without start should not break
          ...

        1..1
        # failed 1 test
    not ok 1 - Calling require without start should not break # time=862.618ms

The tests do not fail on my local Mac, but do fail with what seems to be the same error on local Linux as well as Travis (Mac, Linux and Windows: https://travis-ci.org/RuntimeTools/appmetrics/builds/538256997?utm_source=github_status&utm_medium=notification).

Proposed solution