From 99cb9a7fb22f112f32de333756f32ac13e588a54 Mon Sep 17 00:00:00 2001 From: Youngone Lee Date: Tue, 12 Apr 2022 16:42:35 -0500 Subject: [PATCH] fix: remove skip to pass test case Currently this test case is being skipped due to issues with the Iroha AIO image: packages/cactus-plugin-ledger-connector-iroha/src/ test/typescript/integration/ run-transaction-endpoint-v1.test.ts removal of skip resulted in the test case passing over 20 times, might still be flaky. Fixes #1957 Signed-off-by: Youngone Lee --- .../run-transaction-endpoint-v1.test.ts | 55 +------------------ 1 file changed, 1 insertion(+), 54 deletions(-) diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts index 6ed2fa03ec..59ca28cc2b 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts @@ -50,7 +50,7 @@ test("BEFORE " + testCase, async (t: Test) => { }); // Test fails because Iroha is unable to connect to Postgres for some reason. -test.skip(testCase, async (t: Test) => { +test(testCase, async (t: Test) => { const postgres = new PostgresTestContainer({ logLevel }); test.onFinish(async () => { @@ -1086,59 +1086,6 @@ test.skip(testCase, async (t: Test) => { t.equal(res.status, 200); t.equal(res.data.transactionReceipt.status, "COMMITTED"); } - - // // Use Promise.race to cancel the promise - // { - // const req1 = { - // commandName: "producePendingTx", - // params: [], - // }; - // Promise.race([ - // //FIXME - the Iroha Javascript SDK does not give any output if we try to produce a pending transaction - // // This results in an infinite loop and thus the following code cannot be executed. - // // This fix is not perfect. It cancels the request with a timeout, but will result in grpc "Error: 14 UNAVAILABLE: GOAWAY received - // // Once the Iroha Javascript SDK is justitied. We can safely produce a pending transaction. - // apiClient.runTransactionV1(req1), - // new Promise((resolve) => setTimeout(resolve, 1000)), - // ]); - // } - - // use bluebird to cancel Promise - // { - // const req1 = { - // commandName: "producePendingTx", - // params: [], - // }; - // const promise = apiClient.runTransactionV1(req1); - // const p2 = new Promise((onCancel) => { - // promise; - // onCancel(() => console.log("p2 canceled")); - // }); - // p2.cancel(); - // } - - // // { - // // const req = { - // // commandName: "removePeer", - // // params: [ - // // "0000000000000000000000000000000000000000000000000000000000000002", - // // ], - // // }; - // // const res = await apiClient.runTransactionV1(req); - // // console.log(res.data.transactionReceipt); - // // } - - // // { - // // const req = { - // // commandName: "fetchCommits", - // // params: [], - // // }; - // // const res = await apiClient.runTransactionV1(req); - // // t.ok(res); - // // t.ok(res.data); - // // t.equal(res.status, 200); - // // console.log(res.data.transactionReceipt); - // // } t.end(); });