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 25, 2022
1 parent b917435 commit 7ef29cf
Show file tree
Hide file tree
Showing 3 changed files with 638 additions and 610 deletions.
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();
});
});
Loading

0 comments on commit 7ef29cf

Please sign in to comment.