Commit c9e1c10
committed
🐛 Manager.Elected() should beclosed after runnables are started
During debugging a weird issue with some tests failing if they were
running too fast. In other words, calling Start() and Close() on
a manager too fast throws an error where the informers haven't been able
to sync, which then makes Start() fail with an error.
In an effort to improve this behavior, tried to use Elected() to wait
for leader election to start, which also waits for the cache.
During some debugging, this issue happened again and upon digging a bit
more it seems that the channel was closed before starting the runnables
in some cases.
This change reorders the close on cm.elected, which should fix the above
issue.
Signed-off-by: Vince Prignano <[email protected]>1 parent 73c52e8 commit c9e1c10
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| 476 | + | |
476 | 477 | | |
477 | | - | |
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
| |||
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
635 | | - | |
636 | 635 | | |
| 636 | + | |
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
| |||
0 commit comments