Skip to content

Commit d3eb8e1

Browse files
committed
Improve stability of Broker proxy filtering test
1 parent dc970b7 commit d3eb8e1

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

packages/kusama/src/__snapshots__/coretimeKusama.proxy.e2e.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ exports[`Kusama Coretime Proxy > proxy call filtering test for Broker > events f
565565
"result": {
566566
"Err": {
567567
"Module": {
568-
"error": "0x0b000000",
568+
"error": "0x0e000000",
569569
"index": 50,
570570
},
571571
},

packages/polkadot/src/__snapshots__/coretimePolkadot.proxy.e2e.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ exports[`Polkadot Coretime Proxy > proxy call filtering test for Broker > events
565565
"result": {
566566
"Err": {
567567
"Module": {
568-
"error": "0x0b000000",
568+
"error": "0x0e000000",
569569
"index": 50,
570570
},
571571
},

packages/shared/src/proxy.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,15 @@ class ProxyActionBuilderImpl<
301301
buildBrokerRenewerAction(): ProxyAction[] {
302302
const brokerRenewerCalls: ProxyAction[] = []
303303
if (this.client.api.tx.broker) {
304+
// Coretime renewal can fail for different reasons at different times, and this can cause unstable snapshots.
305+
// To control which failure occurs, the global Coretime parachain's `Configuration` is set to `null`,
306+
// as this way the call to `renew` will predictably fail on the nonexistence of a configuration.
307+
this.client.dev.setStorage({
308+
Broker: {
309+
Configuration: null,
310+
},
311+
})
312+
304313
brokerRenewerCalls.push({
305314
pallet: 'broker',
306315
extrinsic: 'renew',

0 commit comments

Comments
 (0)