Skip to content

Commit

Permalink
Fix a test flake for OnNotify. (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
creachadair authored Feb 4, 2021
1 parent e9f1949 commit 8fb19ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jrpc2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
"sort"
"sync/atomic"
"testing"
"time"
Expand Down Expand Up @@ -704,7 +705,9 @@ func TestPushNotify(t *testing.T) {
}

// Shut everything down to be sure the callbacks have settled.
// Sort the results since the order of arrival may vary.
loc.Close()
sort.Strings(notes)

want := []string{"explicit", "method"}
if diff := cmp.Diff(want, notes); diff != "" {
Expand Down

0 comments on commit 8fb19ae

Please sign in to comment.