Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Add test for task fail after unloading publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Kleina committed Jul 12, 2017
1 parent f0dd9f7 commit 63a6c62
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scheduler/workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func TestCollectPublishWorkflow(t *testing.T) {
So(err, ShouldBeNil)
rp2, err := core.NewRequestedPlugin(snap_publisher_file_path, c.GetTempDir(), nil)
So(err, ShouldBeNil)
_, err = c.Load(rp2)
plugPublisher, err := c.Load(rp2)
So(err, ShouldBeNil)
rp3, err := core.NewRequestedPlugin(snap_processor_passthru_path, c.GetTempDir(), nil)
So(err, ShouldBeNil)
Expand Down Expand Up @@ -189,6 +189,12 @@ func TestCollectPublishWorkflow(t *testing.T) {
So(t.LastFailureMessage(), ShouldBeEmpty)
So(t.FailedCount(), ShouldEqual, 0)
So(t.HitCount(), ShouldBeGreaterThan, metricsToCollect)

// check if task fails after unloading publisher
c.Unload(plugPublisher)
<-el.done
So(t.LastFailureMessage(), ShouldNotBeEmpty)
So(t.FailedCount(), ShouldBeGreaterThan, 0)
})
})
})
Expand Down

0 comments on commit 63a6c62

Please sign in to comment.