alphagov/performance-datastore — pull request #22 by jabley (2014-11-02 10:39:40+00:00)
Title: Fix messy test output by using hijacking

```
goroutine 33 [running]:
net/http.func·011()
/opt/boxen/homebrew/Cellar/go/1.3.3/libexec/src/pkg/net/http/server.go:1100 +0xb7
runtime.panic(0x293ac0, 0xc2080372b0)
/opt/boxen/homebrew/Cellar/go/1.3.3/libexec/src/pkg/runtime/panic.c:248 +0x18d
_/Users/jabley/govuk/performance-datastore/pkg/request.func·006(0x618638, 0xc2080666e0, 0xc208000c30)
/Users/jabley/govuk/performance-datastore/pkg/request/request_test.go:43 +0x61
net/http.HandlerFunc.ServeHTTP(0x419308, 0x618638, 0xc2080666e0, 0xc208000c30)
/opt/boxen/homebrew/Cellar/go/1.3.3/libexec/src/pkg/net/http/server.go:1235 +0x40
net/http/httptest.(*waitGroupHandler).ServeHTTP(0xc20803ecc0, 0x618638, 0xc2080666e0, 0xc208000c30)
/opt/boxen/homebrew/Cellar/go/1.3.3/libexec/src/pkg/net/http/httptest/server.go:200 +0xb4
net/http.serverHandler.ServeHTTP(0xc208004d80, 0x618638, 0xc2080666e0, 0xc208000c30)
/opt/boxen/homebrew/Cellar/go/1.3.3/libexec/src/pkg/net/http/server.go:1673 +0x19f
net/http.(*conn).serve(0xc208046700)
/opt/boxen/homebrew/Cellar/go/1.3.3/libexec/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
/opt/boxen/homebrew/Cellar/go/1.3.3/libexec/src/pkg/net/http/server.go:1721 +0x313
2014/11/02 10:05:12 http: panic serving 127.0.0.1:53505: Oh dear
```

Instead, we can use http://golang.org/pkg/net/http/#Hijacker to cleanly
cause the test server to fail to respond, and avoid noisy test output.