Skip to content

Commit

Permalink
test: added wtf-node again
Browse files Browse the repository at this point in the history
  • Loading branch information
mgordel committed Sep 7, 2024
1 parent cef92e2 commit 6673210
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
19 changes: 18 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@
"typedoc-plugin-markdown": "^3.17.1",
"typedoc-plugin-merge-modules": "^5.1.0",
"typedoc-theme-hierarchy": "4.1.2",
"typescript": "^5.3.3"
"typescript": "^5.3.3",
"@types/wtfnode": "^0.7.3",
"wtfnode": "^0.9.3"
},
"optionalDependencies": {
"@rollup/rollup-darwin-x64": "^4",
Expand Down
4 changes: 4 additions & 0 deletions src/golem-network/golem-network.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as wtf from "wtfnode";
import { anyAbortSignal, createAbortSignalFromTimeout, defaultLogger, isNode, Logger, YagnaApi } from "../shared/utils";
import {
Demand,
Expand Down Expand Up @@ -362,6 +363,9 @@ export class GolemNetwork {
* @return Resolves when all shutdown steps are completed
*/
async disconnect() {
setTimeout(() => {
wtf.dump();
}, 33_333);
if (this.disconnectPromise) {
return this.disconnectPromise;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/examples.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async function test(cmd: string, path: string, args: string[] = [], timeout = 36
console.log("Test finishing has already been triggered by another event");
return;
}
console.log(`Subprocess with test ${file} exited with code ${code} by signal ${signal}`);
console.log(`Subprocess with test "${file}" exited with code ${code}, signal ${signal}`);
isFinishing = true;
spawnedExample.removeAllListeners();
spawnedExample.stdout.removeAllListeners();
Expand Down

0 comments on commit 6673210

Please sign in to comment.