Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Fix HTTP listener test & benchmarks
Browse files Browse the repository at this point in the history
The interaction of the last two PRs resulted in the HTTP listener
tests and benchmarks being broken. This change fixes that as well as
suppressing log output during the HTTP listener benchmarks.
  • Loading branch information
mjs committed May 28, 2018
1 parent 84ccaa7 commit 258aed4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions listener/listener_medium_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ func TestHTTPListenerConcurrency(t *testing.T) {
}

func TestHTTPListenerWithPrecision(t *testing.T) {
s := spouttest.RunGnatsd(natsPort)
defer s.Shutdown()

conf := testConfig()
listener := startHTTPListener(t, conf)
defer listener.Stop()
Expand Down Expand Up @@ -364,6 +367,12 @@ func BenchmarkListenerLatency(b *testing.B) {
}

func BenchmarkHTTPListener(b *testing.B) {
spouttest.SuppressLogs()
defer spouttest.RestoreLogs()

s := spouttest.RunGnatsd(natsPort)
defer s.Shutdown()

listener := startHTTPListener(b, testConfig())
defer listener.Stop()

Expand All @@ -384,6 +393,12 @@ func BenchmarkHTTPListener(b *testing.B) {
}

func BenchmarkHTTPListenerWithPrecision(b *testing.B) {
spouttest.SuppressLogs()
defer spouttest.RestoreLogs()

s := spouttest.RunGnatsd(natsPort)
defer s.Shutdown()

listener := startHTTPListener(b, testConfig())
defer listener.Stop()

Expand Down

0 comments on commit 258aed4

Please sign in to comment.