Skip to content

Commit 3f4ad4f

Browse files
jrickdavecgh
authored andcommitted
mixclient: Fix test timeouts
Tests were timing out due to mixpool checks that require KEs to not be received too early for their stated epochs. To speed tests up, the mixclient's internal epoch ticker is manually ticked by the testing code, but this was causing test runs where KE messages were being rejected by mixpool, with the tests never completing and eventually timing out. Using the current time as the epoch whenever the internal epoch ticker is manually ticked by tests resolves the issue and allows all tests to pass. Timeouts spotted by @jholdstock.
1 parent 2aef5d4 commit 3f4ad4f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mixing/mixclient/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ func (c *Client) waitForEpoch(ctx context.Context) (time.Time, error) {
643643
if !timer.Stop() {
644644
<-timer.C
645645
}
646-
return epoch, nil
646+
return time.Now(), nil
647647
case <-timer.C:
648648
return epoch, nil
649649
}

0 commit comments

Comments
 (0)