@@ -362,7 +362,7 @@ func TestPublishBuildToolEventStream(t *testing.T) {
362362 var anyBuildEvent anypb.Any
363363 anyBuildEvent .MarshalFrom (buildEvent )
364364 event := & buildv1.BuildEvent {Event : & buildv1.BuildEvent_BazelEvent {BazelEvent : & anyBuildEvent }}
365- streamId := & buildv1.StreamId {BuildId : "1" }
365+ streamId := & buildv1.StreamId {BuildId : "1" , InvocationId : "1bdca2c1-fa12-4097-b538-4707ce8fe50d" }
366366 orderedBuildEvent := & buildv1.OrderedBuildEvent {
367367 StreamId : streamId ,
368368 SequenceNumber : 1 ,
@@ -398,23 +398,26 @@ func TestPublishBuildToolEventStream(t *testing.T) {
398398 }
399399 close (besBackend .ready )
400400 var calledSubscriber1 , calledSubscriber2 , calledSubscriber3 bool
401- besBackend .RegisterSubscriber (func (evt * buildeventstream.BuildEvent , sn int64 ) error {
401+ besBackend .RegisterSubscriber (func (evt * buildeventstream.BuildEvent , sn int64 , invocationId string ) error {
402402 // g.Expect(evt).To(Equal(buildEvent))
403403 g .Expect (sn ).To (Equal (orderedBuildEvent .SequenceNumber ))
404+ g .Expect (invocationId ).To (Equal (orderedBuildEvent .StreamId .InvocationId ))
404405 calledSubscriber1 = true
405406 return nil
406407 }, false )
407408 expectedSubscriber2Err := fmt .Errorf ("error from subscriber 2" )
408- besBackend .RegisterSubscriber (func (evt * buildeventstream.BuildEvent , sn int64 ) error {
409+ besBackend .RegisterSubscriber (func (evt * buildeventstream.BuildEvent , sn int64 , invocationId string ) error {
409410 // g.Expect(evt).To(Equal(buildEvent))
410411 g .Expect (sn ).To (Equal (orderedBuildEvent .SequenceNumber ))
412+ g .Expect (invocationId ).To (Equal (orderedBuildEvent .StreamId .InvocationId ))
411413 calledSubscriber2 = true
412414 return expectedSubscriber2Err
413415 }, false )
414416 expectedSubscriber3Err := fmt .Errorf ("error from subscriber 3" )
415- besBackend .RegisterSubscriber (func (evt * buildeventstream.BuildEvent , sn int64 ) error {
417+ besBackend .RegisterSubscriber (func (evt * buildeventstream.BuildEvent , sn int64 , invocationId string ) error {
416418 // g.Expect(evt).To(Equal(buildEvent))
417419 g .Expect (sn ).To (Equal (orderedBuildEvent .SequenceNumber ))
420+ g .Expect (invocationId ).To (Equal (orderedBuildEvent .StreamId .InvocationId ))
418421 calledSubscriber3 = true
419422 return expectedSubscriber3Err
420423 }, false )
0 commit comments