Skip to content

Commit d8e15d1

Browse files
committed
test: clear cleanup timer in tunnel tests
The cleanup timer wasn't cleared if a start/stop test was cancelled which would make the self tests appear to hang.
1 parent 4274c50 commit d8e15d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/support/integration.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,13 @@ export function addStartStopTest(
142142
}
143143

144144
return tunnel
145-
.start()!
145+
.start()
146146
.then(function() {
147147
clearTimeout(cleanupTimer);
148148
return tunnel.stop();
149149
})
150150
.catch(reason => {
151+
clearTimeout(cleanupTimer);
151152
if (reason.code === 'ECONNREFUSED') {
152153
this.skip('Service is unreachable');
153154
} else {

0 commit comments

Comments
 (0)