Skip to content

Commit

Permalink
Make timedout status a const
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Dec 18, 2023
1 parent 73ba96f commit 44e6145
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/mbt/driver/mbt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (

const verbose = false

const TIMEDOUT_STATUS = "timedout"

// keep some interesting statistics
var stats = Stats{}

Expand Down Expand Up @@ -299,7 +301,7 @@ func RunItfTrace(t *testing.T, path string) {
// delivering the packet should give an error
// if the consumer is timed out in the model
var expectError bool
if ConsumerStatus(currentModelState, consumerChain) == "timedout" {
if ConsumerStatus(currentModelState, consumerChain) == TIMEDOUT_STATUS {
expectError = true
driver.DeliverPacketToConsumer(ChainId(consumerChain), expectError)

Expand All @@ -314,7 +316,7 @@ func RunItfTrace(t *testing.T, path string) {
t.Log("DeliverVscMaturedPacket", consumerChain)

var expectError bool
if ConsumerStatus(currentModelState, consumerChain) == "timedout" {
if ConsumerStatus(currentModelState, consumerChain) == TIMEDOUT_STATUS {
expectError = true
// expectError is true, because we expect the consumer to have timed out.
// the call will fail if there is no error
Expand Down

0 comments on commit 44e6145

Please sign in to comment.