Skip to content

Commit

Permalink
change naming
Browse files Browse the repository at this point in the history
  • Loading branch information
shaspitz committed Sep 19, 2023
1 parent d089c51 commit 9c4a004
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
11 changes: 5 additions & 6 deletions tests/e2e/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -1974,17 +1974,16 @@ func (tr TestRun) waitForSlashMeterReplenishment(
}
}

type slashPacketRetryAction struct {
type WaitTimeAction struct {
consumer chainID
waitTime time.Duration
}

func (tr TestRun) waitForSlashRetry(
action slashPacketRetryAction,
func (tr TestRun) waitForTime(
action WaitTimeAction,
verbose bool,
) {
// Retry delay period is set to 30 seconds, see config.go
// wait this amount of time to elapse the period
tr.WaitTime(30 * time.Second)
tr.WaitTime(action.waitTime)
}

// GetPathNameForGorelayer returns the name of the path between two given chains used by Gorelayer.
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ func (tr *TestRun) runStep(step Step, verbose bool) {
tr.assignConsumerPubKey(action, verbose)
case slashMeterReplenishmentAction:
tr.waitForSlashMeterReplenishment(action, verbose)
case slashPacketRetryAction:
tr.waitForSlashRetry(action, verbose)
case WaitTimeAction:
tr.waitForTime(action, verbose)
case startRelayerAction:
tr.startRelayer(action, verbose)
case registerConsumerRewardDenomAction:
Expand Down
7 changes: 5 additions & 2 deletions tests/e2e/steps_downtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,13 @@ func stepsThrottledDowntime(consumerName string) []Step {
},
},
},
// Wait for retry delay period to pass
// Wait for retry delay period to pass.
// Retry delay period is set to 30 seconds, see config.go,
// wait this amount of time to elapse the period.
{
action: slashPacketRetryAction{
action: WaitTimeAction{
consumer: chainID(consumerName),
waitTime: 30 * time.Second,
},
state: State{
chainID("provi"): ChainState{
Expand Down

0 comments on commit 9c4a004

Please sign in to comment.