Fix test.

This commit is contained in:
Arijit Das
2020-06-12 00:29:12 +05:30
parent 60d949a243
commit f89c52445b
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ type Middleware struct {
Stdin io.Writer
Stdout io.Reader
stop chan bool // Channel used only to indicate goroutine should shutdown
stop chan bool // Channel used only to indicate goroutine should shutdown
}
func NewMiddleware(command string) *Middleware {
+5 -2
View File
@@ -49,11 +49,14 @@ func TestFileOutput(t *testing.T) {
Inputs: []io.Reader{input2},
Outputs: []io.Writer{output2},
}
plugins2.All = append(plugins2.All, input2, output2)
go emitter.Start(plugins2, Settings.middleware)
quit2 := make(chan int)
emitter2 := NewEmitter(quit2)
go emitter2.Start(plugins2, Settings.middleware)
wg.Wait()
emitter.Close()
emitter2.Close()
}
func TestFileOutputWithNameCleaning(t *testing.T) {