Closed Crim closed 6 years ago
@stanlemon assigning this one to you, I'm not sure what the best approach here is, but this feels suspect in either assumptions SidelineSpoutHandler is making, or the test case is fubar.
Perhaps onSpoutClose() needs to null the firehose reference in SidelineSpoutHandler if its closed?
@Crim I think #73 resolves this. I actually think the test is sound, the state handling in the handler is just wonky.
Closing as resolved.
This behavior is shown in test: SidelineSpoutHandlerTest::testLoadSidelines
More specifically in these code lines the test removes running VirtualSpouts. It then calls loadSidelines() which triggers these lines to fire:
SidelineSpoutHandler.java
What is happening here the Firehose VirtualSpout instance already exists, but its not "running" so it attempts to re-add it to the Coordinator. The coordinator fires it up, but when it calls open() on the VirtualSpout it explodes complaining that it's already been opened. You end up with exceptions like these:
I'm unsure if this is a bug in SidelineSpoutHandler, in that it shouldn't try to re-start VirtualSpouts that are already opened, but instead re-create them? Or if its a bug in the test case scenario?