@@ -809,38 +809,12 @@ func TestApplier(t *testing.T) {
809
809
InventoryPolicy : inventory .PolicyMustMatch ,
810
810
EmitStatusEvents : true ,
811
811
},
812
- statusEvents : []pollevent.Event {
813
- {
814
- Type : pollevent .ResourceUpdateEvent ,
815
- Resource : & pollevent.ResourceStatus {
816
- Identifier : testutil .ToIdentifier (t , resources ["deployment" ]),
817
- Status : status .InProgressStatus ,
818
- },
819
- },
820
- {
821
- Type : pollevent .ResourceUpdateEvent ,
822
- Resource : & pollevent.ResourceStatus {
823
- Identifier : testutil .ToIdentifier (t , resources ["deployment" ]),
824
- Status : status .CurrentStatus ,
825
- },
826
- },
827
- },
828
- expectedStatusEvents : []testutil.ExpEvent {
829
- {
830
- EventType : event .StatusType ,
831
- StatusEvent : & testutil.ExpStatusEvent {
832
- Identifier : testutil .ToIdentifier (t , resources ["deployment" ]),
833
- Status : status .InProgressStatus ,
834
- },
835
- },
836
- {
837
- EventType : event .StatusType ,
838
- StatusEvent : & testutil.ExpStatusEvent {
839
- Identifier : testutil .ToIdentifier (t , resources ["deployment" ]),
840
- Status : status .CurrentStatus ,
841
- },
842
- },
843
- },
812
+ // There could be some status events for the existing Deployment,
813
+ // but we can't always expect to receive them before the applier
814
+ // exits, because the WaitTask is skipped when the ApplyTask errors.
815
+ // So don't bother sending or expecting them.
816
+ statusEvents : []pollevent.Event {},
817
+ expectedStatusEvents : []testutil.ExpEvent {},
844
818
expectedEvents : []testutil.ExpEvent {
845
819
{
846
820
EventType : event .InitType ,
@@ -1933,7 +1907,7 @@ func TestApplierCancel(t *testing.T) {
1933
1907
var removed int
1934
1908
receivedEvents , removed = testutil .RemoveEqualEvents (receivedEvents , e )
1935
1909
if removed < 1 {
1936
- t .Fatalf ("Expected status event not received: %#v" , e .StatusEvent )
1910
+ t .Errorf ("Expected status event not received: %#v" , e .StatusEvent )
1937
1911
}
1938
1912
}
1939
1913
0 commit comments