INNER CODE UNIT · Go

TestCoordinatorRemoveItem

lucagrulla/cw · main_test.go:112

func TestCoordinatorRemoveItem(t *testing.T) {
	a := assert.New(t)
	log := log.New(io.Discard, "", log.LstdFlags)

	groupTrigger1 := make(chan time.Time, 1)
	groupTrigger2 := make(chan time.Time, 1)

	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 {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…