diff --git a/Makefile b/Makefile index 9646bcae60..dbc4a32964 100644 --- a/Makefile +++ b/Makefile @@ -43,9 +43,9 @@ test-mbt-cov: go test ./tests/mbt/... -timeout 30m -coverpkg=./... -coverprofile=mbt-profile.out -covermode=atomic # runs mbt tests, but generates more traces -test-mbt-long: +test-mbt-more-traces: cd tests/mbt/driver;\ - sh generate_traces_long.sh;\ + sh generate_more_traces.sh;\ cd ../../..;\ go test ./tests/mbt/... -timeout 30m diff --git a/tests/mbt/driver/core.go b/tests/mbt/driver/core.go index 417a286e77..9dbddd89eb 100644 --- a/tests/mbt/driver/core.go +++ b/tests/mbt/driver/core.go @@ -113,7 +113,7 @@ func (s *Driver) validator(i int64) sdk.ValAddress { } // consumerPower returns the power on the consumer chain chain for -// validator with id (ix) i +// the validator with index i func (s *Driver) consumerPower(i int64, chain ChainId) (int64, error) { v, found := s.consumerKeeper(chain).GetCCValidator(s.ctx(chain), s.validator(i)) if !found { @@ -149,9 +149,7 @@ func (s *Driver) delegate(val, amt int64) { d := s.delegator() v := s.validator(val) msg := stakingtypes.NewMsgDelegate(d, v, coin) - _, err := server.Delegate(sdk.WrapSDKContext(s.ctx(P)), msg) - // There may or may not be an error, depending on the trace - _ = err + server.Delegate(sdk.WrapSDKContext(s.ctx(P)), msg) } // undelegate undelegates amt tokens from validator val @@ -162,13 +160,11 @@ func (s *Driver) undelegate(val, amt int64) { d := s.delegator() v := s.validator(val) msg := stakingtypes.NewMsgUndelegate(d, v, coin) - _, err := server.Undelegate(sdk.WrapSDKContext(s.ctx(P)), msg) - // There may or may not be an error, depending on the trace - _ = err + server.Undelegate(sdk.WrapSDKContext(s.ctx(P)), msg) providerStaking.GetAllDelegations(s.ctx(P)) } -// packetQueue returns the queued packet sfrom sender to receiver, +// packetQueue returns the queued packets from sender to receiver, // where either sender or receiver must be the provider. func (s *Driver) packetQueue(sender, receiver ChainId) []simibc.Packet { var path *simibc.RelayedPath @@ -213,7 +209,7 @@ func (s *Driver) getStateString() string { } func (s *Driver) isProviderChain(chain ChainId) bool { - return chain == "provider" + return chain == P } func (s *Driver) getChainStateString(chain ChainId) string { diff --git a/tests/mbt/driver/generate_traces_long.sh b/tests/mbt/driver/generate_more_traces.sh similarity index 100% rename from tests/mbt/driver/generate_traces_long.sh rename to tests/mbt/driver/generate_more_traces.sh diff --git a/tests/mbt/model/ccv.qnt b/tests/mbt/model/ccv.qnt index 9d2627d666..8249c824ea 100644 --- a/tests/mbt/model/ccv.qnt +++ b/tests/mbt/model/ccv.qnt @@ -388,7 +388,7 @@ module ccv { consumersToStop: Set[Chain]): Result = { val currentProviderState = currentState.providerState - // check for Vsc timeouts + // check for vsc timeouts val timedOutConsumers = getRunningConsumers(currentProviderState).filter( consumer => val res = TimeoutDueToVscTimeout(currentState, consumer)