ugly workaround to fix the tests (#2080)
* ugly workaround to fix the tests * add comments --------- Co-authored-by: sabban <15465465+sabban@users.noreply.github.com>
This commit is contained in:
parent
39a4a256fd
commit
60b3f63851
1 changed files with 4 additions and 0 deletions
|
@ -196,6 +196,10 @@ func shutdown(sig os.Signal, cConfig *csconfig.Config) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func drainChan(c chan types.Event) {
|
func drainChan(c chan types.Event) {
|
||||||
|
time.Sleep(500 * time.Millisecond)
|
||||||
|
// delay to avoid draining chan before the acquisition/parser
|
||||||
|
// get a chance to push its event
|
||||||
|
// We should close the chan on the writer side rather than this
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case _, ok := <-c:
|
case _, ok := <-c:
|
||||||
|
|
Loading…
Reference in a new issue