Skip to content

Commit 5b598b0

Browse files
committed
fix(tests): stop associating signers per token, raise iteration timeout
Signed-off-by: ValentinVPK <valentin.krumov@limechain.tech>
1 parent 7513119 commit 5b598b0

3 files changed

Lines changed: 17 additions & 35 deletions

File tree

.github/workflows/test-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ permissions:
2929
jobs:
3030
acceptance-workflow:
3131
runs-on: hl-contr-lin-lg
32-
timeout-minutes: 15 # TEMPORARY (v0.77 iteration) — restore to 45 before merge
32+
timeout-minutes: 25 # TEMPORARY (v0.77 iteration) — restore to 45 before merge
3333
strategy:
3434
fail-fast: false
3535

test/token-service/hrc-904/AirdropContract.js

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -97,34 +97,6 @@ describe('HIP904Batch1 AirdropContract Test Suite', function () {
9797
)
9898
).wait();
9999
}
100-
101-
// [diag] strip once this suite is green. Reports whether the receivers
102-
// really ended up with unlimited auto-association, and what code a plain
103-
// airdrop returns — the contract reverts with no reason on a non-SUCCESS
104-
// code, so without this a failure says nothing.
105-
for (const account of accounts) {
106-
console.log(
107-
'[diag] maxAutoAssoc',
108-
account,
109-
await utils.getMaxAutomaticTokenAssociations(account),
110-
);
111-
}
112-
const diagTx = await airdropContract.tokenAirdrop(
113-
tokenAddress,
114-
owner,
115-
accounts[0],
116-
BigInt(1),
117-
{ ...Constants.GAS_LIMIT_2_000_000, value: Constants.ONE_HBAR },
118-
);
119-
try {
120-
await diagTx.wait();
121-
console.log('[diag] plain airdrop with value: OK');
122-
} catch {
123-
console.log(
124-
'[diag] plain airdrop reverted, hts code =',
125-
await utils.getHTSResponseCode(diagTx.hash),
126-
);
127-
}
128100
});
129101

130102
after(function () {

test/token-service/utils.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -791,10 +791,15 @@ class Utils {
791791
false,
792792
);
793793

794-
await this.associateToken(
795-
tokenCreateContract,
794+
// Only the contract's own association is meaningful now: the signers can no
795+
// longer be associated through the contract (that needed the re-key) and
796+
// they take tokens by auto-association instead. Those three per-token calls
797+
// reverted and were silently swallowed, and at ~48 tokens per suite they
798+
// cost enough wall clock to push the job past its timeout.
799+
await tokenCreateContract.associateTokenPublic(
800+
await tokenCreateContract.getAddress(),
796801
nftTokenAddress,
797-
Constants.Contract.TokenCreateContract,
802+
Constants.GAS_LIMIT_1_000_000,
798803
);
799804

800805
return nftTokenAddress;
@@ -820,10 +825,15 @@ class Utils {
820825
false,
821826
);
822827

823-
await this.associateToken(
824-
tokenCreateContract,
828+
// Only the contract's own association is meaningful now: the signers can no
829+
// longer be associated through the contract (that needed the re-key) and
830+
// they take tokens by auto-association instead. Those three per-token calls
831+
// reverted and were silently swallowed, and at ~48 tokens per suite they
832+
// cost enough wall clock to push the job past its timeout.
833+
await tokenCreateContract.associateTokenPublic(
834+
await tokenCreateContract.getAddress(),
825835
tokenAddress,
826-
Constants.Contract.TokenCreateContract,
836+
Constants.GAS_LIMIT_1_000_000,
827837
);
828838

829839
return tokenAddress;

0 commit comments

Comments
 (0)