Skip to content

Commit f358279

Browse files
committed
[FAB-4037] Fix intermittent timeouts in events UT
This CR resolves the issue leading to the intermittent UT failures for the events package. It was caused by one test case setting the event processor timeout to a low value without resetting the value at the end of the test case. This CR also removes fabric/events/events_test.go because its test cases were all moved to fabric/events/producer_test.go by the CR that caused the UT failures. Change-Id: Ia3b0c9c4ff3c5a7df20c509741e17199aa6867e4 Signed-off-by: Will Lahti <[email protected]>
1 parent ed41640 commit f358279

File tree

3 files changed

+5
-384
lines changed

3 files changed

+5
-384
lines changed

events/events_test.go

-380
This file was deleted.

events/producer/events_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,12 @@ func TestEvents(t *testing.T) {
104104
gEventProcessor = gEventProcessorBck
105105
Send(e)
106106
}
107+
prevTimeout := gEventProcessor.timeout
107108
for _, timeout := range []time.Duration{0, -1, 1} {
108109
gEventProcessor.timeout = timeout
109110
test(timeout)
110111
}
112+
gEventProcessor.timeout = prevTimeout
111113
}
112114

113115
func TestDeRegister(t *testing.T) {

0 commit comments

Comments
 (0)