Skip to content

Commit f91f7e9

Browse files
committed
remove dead code
1 parent 93af25c commit f91f7e9

File tree

3 files changed

+8
-133
lines changed

3 files changed

+8
-133
lines changed

system-tests/tests/regression/cre/v2_cron_beholder_regression_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ func CronBeholderFailsWithInvalidScheduleTest(t *testing.T, testEnv *ttypes.Test
4444

4545
testLogger.Warn().Msgf("Expecting Cron workflow to fail with invalid schedule: %s", invalidSchedule)
4646
expectedBeholderLog := "beholder found engine initialization failure message!"
47-
4847
timeout := 75 * time.Second
4948
expectedError := t_helpers.AssertBeholderMessage(listenerCtx, t, expectedBeholderLog, testLogger, messageChan, kafkaErrChan, timeout)
5049
require.Error(t, expectedError, "Cron (Beholder) test failed. This test expects to fail with an error, but did not.")

system-tests/tests/test-helpers/chip_testsink_helpers.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func collectChannels(args ...any) []reflect.Value {
117117
}
118118
}
119119
default:
120-
framework.L.Warn().Msgf("unsupported arg to ShutdownChipSinkWithDrainAndClose: %T", arg)
120+
framework.L.Warn().Msgf("unsupported arg to ShutdownChipSinkWithDrain: %T", arg)
121121
}
122122
}
123123
return channels
@@ -127,6 +127,7 @@ func collectChannels(args ...any) []reflect.Value {
127127
func startReflectChannelDrainers(channels []reflect.Value) func() {
128128
ctx, cancel := context.WithCancel(context.Background())
129129
var wg sync.WaitGroup
130+
doneCh := reflect.ValueOf(ctx.Done())
130131

131132
for _, ch := range channels {
132133
if !ch.IsValid() || ch.Kind() != reflect.Chan || ch.IsNil() {
@@ -136,15 +137,15 @@ func startReflectChannelDrainers(channels []reflect.Value) func() {
136137
wg.Add(1)
137138
go func(ch reflect.Value) {
138139
defer wg.Done()
140+
cases := []reflect.SelectCase{
141+
{Dir: reflect.SelectRecv, Chan: ch},
142+
{Dir: reflect.SelectRecv, Chan: doneCh},
143+
}
139144
for {
140-
select {
141-
case <-ctx.Done():
145+
chosen, _, ok := reflect.Select(cases)
146+
if chosen == 1 {
142147
return
143-
default:
144148
}
145-
146-
// Recv blocks until an element is available or the channel closes.
147-
_, ok := ch.Recv()
148149
if !ok {
149150
return
150151
}

system-tests/tests/test-helpers/workflow_event_observer.go

Lines changed: 0 additions & 125 deletions
This file was deleted.

0 commit comments

Comments
 (0)