summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Fifield <david@bamsoftware.com>2020-02-04 15:43:35 -0700
committerDavid Fifield <david@bamsoftware.com>2020-02-04 15:43:35 -0700
commit8dfe47a1cad21dbad197e988f1bd032d724df42a (patch)
tree6da38b900411b10a9dc0ee38fd2e68ffe43b3169
parent4a13694eefc21a11a2a9df5a59bbfba90a9e38da (diff)
Simplify generation of dummy data in TestConcurrentRead.bug33144-websocketconn
Spotted by cohosh in https://bugs.torproject.org/33144#comment:4.
-rw-r--r--common/websocketconn/websocketconn_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/websocketconn/websocketconn_test.go b/common/websocketconn/websocketconn_test.go
index 9bc02ec..ad6f100 100644
--- a/common/websocketconn/websocketconn_test.go
+++ b/common/websocketconn/websocketconn_test.go
@@ -170,7 +170,7 @@ func TestConcurrentRead(t *testing.T) {
// Write a bunch of data to the other end.
for i := 0; i < 2000; i++ {
- _, err := c.Write([]byte(fmt.Sprintf("%d", i)))
+ _, err := fmt.Fprintf(c, "%d", i)
if err != nil {
c.Close()
t.Fatalf("Write: %v", err)