Skip to content

Tests fail frequently in bluebird v3.6.0 and v3.7.0 #1613

@Trott

Description

@Trott
  1. What version of bluebird is the issue happening on?

v3.6.0 and v3.7.0

  1. What platform and version? (For example Node.js 0.12 or Google Chrome 32)

Node.js 12.11.1 on macOS

  1. Did this issue happen with earlier version of bluebird?

No.

(Write description of your issue here, stack traces from errors and code that reproduces the issue are helpful)

I bisected the issue to 60ef7a0. That commit makes the tests unreliable for me locally on macOS using Node.js 12.11.1. It doesn't fail every time but it fails most of the time if I use npm test and less often if I use node tools/test --run=unhandled_rejections.js:

55 passing (222ms)
  1 failing

  1) issues GH-1487-8:
     Error: Reporting handled rejection as unhandled from: function testFunction() {
        var ret = onUnhandledFail(testFunction);
        var arr = [ Promise.reject( new Error('foo') ) ];
        var p = Promise.resolve( arr );
        p.filter( function() {} ).caught( function() {} );
        return ret;
    }
      at /Users/trott/temp/bluebird/test/mocha/helpers/util.js:142:23
  From previous event:
      at onUnhandledFail (/Users/trott/temp/bluebird/test/mocha/helpers/util.js:141:16)
      at context.testFunction (/Users/trott/temp/bluebird/test/mocha/unhandled_rejections.js:869:19)
      at callFn (/Users/trott/temp/bluebird/node_modules/mocha/lib/runnable.js:251:21)
      at Test.Runnable.run (/Users/trott/temp/bluebird/node_modules/mocha/lib/runnable.js:244:7)
      at Runner.runTest (/Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:374:10)
      at /Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:452:12
      at next (/Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:299:14)
      at /Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:309:7
      at next (/Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:248:23)
      at /Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:271:7
      at done (/Users/trott/temp/bluebird/node_modules/mocha/lib/runnable.js:207:5)
      at callFn (/Users/trott/temp/bluebird/node_modules/mocha/lib/runnable.js:262:7)
      at Hook.Runnable.run (/Users/trott/temp/bluebird/node_modules/mocha/lib/runnable.js:244:7)
      at next (/Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:259:10)
      at Immediate.<anonymous> (/Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:276:5)
      at processImmediate (internal/timers.js:439:21)



Error: Reporting handled rejection as unhandled from: function testFunction() {
        var ret = onUnhandledFail(testFunction);
        var arr = [ Promise.reject( new Error('foo') ) ];
        var p = Promise.resolve( arr );
        p.filter( function() {} ).caught( function() {} );
        return ret;
    }
    at /Users/trott/temp/bluebird/test/mocha/helpers/util.js:142:23
    at onUnhandledFail (/Users/trott/temp/bluebird/test/mocha/helpers/util.js:141:16)
    at context.testFunction (/Users/trott/temp/bluebird/test/mocha/unhandled_rejections.js:869:19)
    at callFn (/Users/trott/temp/bluebird/node_modules/mocha/lib/runnable.js:251:21)
    at Test.Runnable.run (/Users/trott/temp/bluebird/node_modules/mocha/lib/runnable.js:244:7)
    at Runner.runTest (/Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:374:10)
    at /Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:452:12
    at next (/Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:299:14)
    at /Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:309:7
    at next (/Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:248:23)
    at /Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:271:7
    at done (/Users/trott/temp/bluebird/node_modules/mocha/lib/runnable.js:207:5)
    at callFn (/Users/trott/temp/bluebird/node_modules/mocha/lib/runnable.js:262:7)
    at Hook.Runnable.run (/Users/trott/temp/bluebird/node_modules/mocha/lib/runnable.js:244:7)
    at next (/Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:259:10)
    at Immediate.<anonymous> (/Users/trott/temp/bluebird/node_modules/mocha/lib/runner.js:276:5)
From previous event:
    at Object.run (/Users/trott/temp/bluebird/tools/job-runner/job-runner.js:141:27)
    at runTestGroup (/Users/trott/temp/bluebird/tools/test.js:123:22)
    at /Users/trott/temp/bluebird/tools/test.js:261:16
    at processImmediate (internal/timers.js:439:21)
From previous event:
    at Object.<anonymous> (/Users/trott/temp/bluebird/tools/test.js:254:27)
    at Module._compile (internal/modules/cjs/loader.js:945:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:962:10)
    at Module.load (internal/modules/cjs/loader.js:798:32)
    at Function.Module._load (internal/modules/cjs/loader.js:711:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1014:10)
    at internal/main/run_main_module.js:17:11

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions