Disable block timeouts in E2E test network #19

Merged
ashwin merged 5 commits from pm-variable-timeout into main 2024-03-12 04:35:21 +00:00
Showing only changes of commit f2345ea089 - Show all commits

View File

@ -676,8 +676,8 @@ func (n *Network) LatestHeight(t time.Duration) (int64, error) {
for {
select {
case <-timeout.C:
return latestHeight, errors.New("timeout exceeded waiting for block")
// case <-timeout.C:
// return latestHeight, errors.New("timeout exceeded waiting for block")
case <-ticker.C:
done := make(chan struct{})
go func() {
@ -695,6 +695,7 @@ func (n *Network) LatestHeight(t time.Duration) (int64, error) {
return latestHeight, nil
}
}
default: //nolint: all
}
}
}
@ -725,8 +726,8 @@ func (n *Network) WaitForHeightWithTimeout(h int64, t time.Duration) (int64, err
for {
select {
case <-timeout.C:
return latestHeight, errors.New("timeout exceeded waiting for block")
// case <-timeout.C:
// return latestHeight, errors.New("timeout exceeded waiting for block")
case <-ticker.C:
res, err := queryClient.GetLatestBlock(context.Background(), &cmtservice.GetLatestBlockRequest{})
@ -736,6 +737,7 @@ func (n *Network) WaitForHeightWithTimeout(h int64, t time.Duration) (int64, err
return latestHeight, nil
}
}
default: //nolint: all
}
}
}