Skip to content

Commit a324120

Browse files
committed
feature: add logs for executeExtrinsic & error handling, skip AppPromo tests for update case
1 parent b954998 commit a324120

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

.github/workflows/main-process-update.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ jobs:
283283
NOW=$(date +%s) && deno task testSubParallel
284284
env:
285285
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
286+
SKIP_APP_PROMO_TESTS: 1
286287

287288
- name: Run Sequential Substrate tests after upgrade
288289
working-directory: js-packages/tests
@@ -291,6 +292,7 @@ jobs:
291292
NOW=$(date +%s) && deno task testSubSequential
292293
env:
293294
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
295+
SKIP_APP_PROMO_TESTS: 1
294296

295297
- name: Run Parallel Ethereum tests after upgrade
296298
working-directory: js-packages/tests

js-packages/playgrounds/unique.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,9 @@ export class ChainHelperBase {
775775
}
776776
catch (e) {
777777
if(!Object.hasOwn(e as object, 'status')) throw e;
778+
console.log(`[ExecuteExtrinsic] Caught error during extrinsic: (${extrinsic})...`);
778779
result = e as ITransactionResult;
780+
if (result == null) throw e;
779781
}
780782

781783
const endTime = (new Date()).getTime();

js-packages/test-utils/util.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ export type FixedDescribe = {
154154
skip: (...args: DescribeArgs<UniqueTestContext>) => void;
155155
ifRunGov: (...args: DescribeArgs<UniqueTestContext>) => TestSuite<UniqueTestContext>;
156156
ifRunXcm: (...args: DescribeArgs<UniqueTestContext>) => TestSuite<UniqueTestContext>;
157+
ifRunAppPromo: (...args: DescribeArgs<UniqueTestContext>) => TestSuite<UniqueTestContext>;
157158
ifRunOcw: (...args: DescribeArgs<UniqueTestContext>) => TestSuite<UniqueTestContext>;
158159
ifRunCollators: (...args: DescribeArgs<UniqueTestContext>) => TestSuite<UniqueTestContext>;
159160
};
@@ -175,6 +176,11 @@ export const describe: FixedDescribe = Object.assign(
175176
? describeBdd<UniqueTestContext>(...args)
176177
: describeBdd.skip<UniqueTestContext>(...args);
177178
},
179+
ifRunAppPromo: (...args: DescribeArgs<UniqueTestContext>) => {
180+
return process.env.SKIP_APP_PROMO_TESTS
181+
? describeBdd.skip<UniqueTestContext>(...args)
182+
: describeBdd<UniqueTestContext>(...args);
183+
},
178184
ifRunOcw: (...args: DescribeArgs<UniqueTestContext>) => {
179185
return process.env.RUN_OCW_TESTS
180186
? describeBdd<UniqueTestContext>(...args)

js-packages/tests/sub/appPromotion/appPromotion.seqtest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let superuser: IKeyringPair;
2222
let donor: IKeyringPair;
2323
let palletAdmin: IKeyringPair;
2424

25-
describe('App promotion', () => {
25+
describe.ifRunAppPromo('App promotion', () => {
2626
before(async function () {
2727
await usingPlaygrounds(async (helper, privateKey) => {
2828
requirePalletsOrSkip(helper, [Pallets.AppPromotion]);

js-packages/tests/sub/appPromotion/appPromotion.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async function getAccounts(accountsNumber: number, balance?: bigint) {
4747
// LOCKING_PERIOD = 12 blocks of relay
4848
// UNLOCKING_PERIOD = 12 blocks of parachain
4949

50-
describe('App promotion', () => {
50+
describe.ifRunAppPromo('App promotion', () => {
5151
before(async function () {
5252
await usingPlaygrounds(async (helper, privateKey) => {
5353
requirePalletsOrSkip(helper, [Pallets.AppPromotion]);

0 commit comments

Comments
 (0)