Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
ciao-launcher: Fix ciao-launcher unit tests
Browse files Browse the repository at this point in the history
A small change was needed to the ciao-launcher unit tests following the
fix to #1009.  The instance go routine now expects and waits for the
monitorClosedCh channel to be closed after it has deleted an instance.
If the channel isn't closed the instance go routine blocks for a few
seconds and this blocking caused a timeout in the unit tests.  The unit tests
now close the monitorClosedCh channel ensuring that the instance
go routine does not block after deleting an instance.

Signed-off-by: Mark Ryan <[email protected]>
  • Loading branch information
Mark Ryan committed Jan 17, 2017
1 parent 33df95e commit 79e0571
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ciao-launcher/instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ func (v *instanceTestState) deleteInstance(t *testing.T, ovsCh chan interface{},
t.Errorf("Invalid monitor command found %t, expected virtualizerStopCmd", monCmd)
return false
}
close(v.monitorClosedCh)
case <-time.After(time.Second):
t.Error("Timed out waiting for ovsStatsUpdateCmd")
return false
Expand Down

0 comments on commit 79e0571

Please sign in to comment.