honeycombio / libhoney-go

Go library for sending data to Honeycomb
Apache License 2.0
58 stars 40 forks source link

Tests won't complete unless -race is used #161

Closed kentquirk closed 2 years ago

kentquirk commented 2 years ago

I was trying to run the tests in libhoney-go, and the TestHoneycombTransmissionFlush test never terminates for me (unless killed by a timeout). But if you run it under the race detector (-race) it works just fine.

Dean said "race detector slows everything down. if there's a race where something being fast makes it deadlock…" Versions

Steps to reproduce

  1. run go test -timeout 30s -count=1 ./... -- it will generate a stack trace after 30 sec
  2. run go test -timeout 30s -count=1 -race ./...

Additional context I'm going to look at adding some sleeps to the test to see if it is in fact a deadlock.