`t.bailout` results in a hang #21

Closed
trentm opened this Issue Nov 30, 2011 · 2 comments

Comments

Projects
None yet
3 participants
@trentm
Contributor

trentm commented Nov 30, 2011

The following hangs:

$ ../bin/node --version
v0.4.12
$ cat foo.test.js
var test = require('tap').test;
test("first", function(t) {
    t.end();
});
test("bail", function(t) {
    t.bailout("boom");
    t.end();
});
test("last", function(t) {
    t.end();
});
$ ../bin/node foo.test.js
# first
^C

I see this with both tap 0.0.14 and 0.0.1. My understanding from the example test file is that this should abort all subsequent tests in the test file.

@isaacs

This comment has been minimized.

Show comment Hide comment
@isaacs

isaacs Nov 30, 2011

Owner

Your understanding is correct. This is a bug.

Owner

isaacs commented Nov 30, 2011

Your understanding is correct. This is a bug.

@bigeasy

This comment has been minimized.

Show comment Hide comment
@bigeasy

bigeasy Dec 12, 2011

It hangs because the timeout is not cleared. It will hang until the timeout is cleared. Setting no timeout, timeout as infinity, causes the program to end on bailout. The processes exists with no output, but should send with "Bail out!" to let the harness know that things are not good.

bigeasy commented Dec 12, 2011

It hangs because the timeout is not cleared. It will hang until the timeout is cleared. Setting no timeout, timeout as infinity, causes the program to end on bailout. The processes exists with no output, but should send with "Bail out!" to let the harness know that things are not good.

@isaacs isaacs closed this in 50ffdab Jan 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment