Skip to content

Commit

Permalink
test(cmd-api-server): fix flaky runtime-plugin-imports test
Browse files Browse the repository at this point in the history
Fixes hyperledger-cacti#1667
Signed-off-by: Youngone Lee <[email protected]>
  • Loading branch information
Leeyoungone committed Mar 8, 2022
1 parent 8f14d27 commit a144d52
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
"lerna": "4.0.0",
"lint-staged": "11.1.2",
"make-dir-cli": "3.0.0",
"node-cleanup": "2.1.2",
"node-polyfill-webpack-plugin": "1.1.4",
"npm-run-all": "4.1.5",
"npm-watch": "0.11.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ import {
PluginImportType,
} from "@hyperledger/cactus-core-api";

const nodeCleanup = require("node-cleanup");
const logLevel: LogLevelDesc = "TRACE";
const testCase = "can import plugins at runtime (CLI)";
describe(testCase, () => {
let apiServer: ApiServer;

test(testCase, async () => {
const pluginsPath = path.join(
__dirname, // start at the current file's path
Expand Down Expand Up @@ -67,5 +69,8 @@ describe(testCase, () => {
];
await expect(apiServer.start()).not.toReject();
});
afterAll(async () => await apiServer.shutdown());
afterAll(async () => {
await apiServer.shutdown();
nodeCleanup();
});
});
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16445,6 +16445,11 @@ node-addon-api@^3.0.0:
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161"
integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==

[email protected]:
version "2.1.2"
resolved "https://registry.yarnpkg.com/node-cleanup/-/node-cleanup-2.1.2.tgz#7ac19abd297e09a7f72a71545d951b517e4dde2c"
integrity sha1-esGavSl+Caf3KnFUXZUbUX5N3iw=

[email protected]:
version "1.0.6"
resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088"
Expand Down

0 comments on commit a144d52

Please sign in to comment.