INNER CODE UNIT · Go

channels

lucagrulla/cw · main_test.go:119

	channels := []chan<- time.Time{chan<- time.Time(groupTrigger1),
		chan<- time.Time(groupTrigger2)}

	coordinator := &tailCoordinator{log: log}
	coordinator.start(channels)

	coordinator.remove(channels[0])

	select {
	case _, ok := <-groupTrigger1:
		if ok {
			a.Fail("Channel should be closed.")
		}
	case <-time.After(1 * time.Second):
		a.Fail("Timeout")
	}
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…