Skip to content

Commit

Permalink
sniblocking: interrupted is a more proper error here
Browse files Browse the repository at this point in the history
When the experiment was written, we didn't have this error. Now that we
have it, we should use it, because it's more proper.

Part of #684
  • Loading branch information
bassosimone committed Jul 1, 2020
1 parent 264636c commit 7f158ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion experiment/sniblocking/sniblocking.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (m *measurer) measureone(
select {
case <-time.After(sleeptime):
case <-ctx.Done():
s := modelx.FailureGenericTimeoutError
s := modelx.FailureInterrupted
return Subresult{
TestKeys: urlgetter.TestKeys{
Failure: &s,
Expand Down
2 changes: 1 addition & 1 deletion experiment/sniblocking/sniblocking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func TestUnitMeasureoneCancelledContext(t *testing.T) {
if result.FailedOperation != nil {
t.Fatal("not the expected FailedOperation")
}
if result.Failure == nil || *result.Failure != modelx.FailureGenericTimeoutError {
if result.Failure == nil || *result.Failure != modelx.FailureInterrupted {
t.Fatal("not the expected failure")
}
if result.NetworkEvents != nil {
Expand Down

0 comments on commit 7f158ed

Please sign in to comment.