mirror of
https://github.com/buger/goreplay.git
synced 2024-04-21 12:32:02 +00:00
Make plugin not global. Revert last-chunk bytes to correct value (#755)
Make Plugins variable not global to fix concurrency in test Revert last-chunk in chunked transfer coding to correct value (https://tools.ietf.org/html/rfc2616#section-3.6.1) fyi @bruce34
This commit is contained in:
+10
-6
@@ -27,10 +27,12 @@ func TestTCPInput(t *testing.T) {
|
||||
wg.Done()
|
||||
})
|
||||
|
||||
Plugins.Inputs = []io.Reader{input}
|
||||
Plugins.Outputs = []io.Writer{output}
|
||||
plugins := &InOutPlugins{
|
||||
Inputs: []io.Reader{input},
|
||||
Outputs: []io.Writer{output},
|
||||
}
|
||||
|
||||
go Start(quit)
|
||||
go Start(plugins, quit)
|
||||
|
||||
tcpAddr, err := net.ResolveTCPAddr("tcp", input.listener.Addr().String())
|
||||
|
||||
@@ -107,10 +109,12 @@ func TestTCPInputSecure(t *testing.T) {
|
||||
wg.Done()
|
||||
})
|
||||
|
||||
Plugins.Inputs = []io.Reader{input}
|
||||
Plugins.Outputs = []io.Writer{output}
|
||||
plugins := &InOutPlugins{
|
||||
Inputs: []io.Reader{input},
|
||||
Outputs: []io.Writer{output},
|
||||
}
|
||||
|
||||
go Start(quit)
|
||||
go Start(plugins, quit)
|
||||
|
||||
conf := &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
|
||||
Reference in New Issue
Block a user