@@ -742,6 +742,7 @@ func TestLinearMixedWatches(t *testing.T) {
742
742
assert .Equal (t , 2 , c .NumResources ())
743
743
744
744
sotwState := stream .NewStreamState (false , nil )
745
+ sotwState .SetKnownResourceNamesAsList (testType , []string {"a" , "b" })
745
746
w := make (chan Response , 1 )
746
747
c .CreateWatch (& Request {ResourceNames : []string {"a" , "b" }, TypeUrl : testType , VersionInfo : c .getVersion ()}, sotwState , w )
747
748
mustBlock (t , w )
@@ -754,7 +755,7 @@ func TestLinearMixedWatches(t *testing.T) {
754
755
err = c .UpdateResources (map [string ]types.Resource {"a" : a }, nil )
755
756
assert .NoError (t , err )
756
757
// This behavior is currently invalid for cds and lds, but due to a current limitation of linear cache sotw implementation
757
- verifyResponse (t , w , c .getVersion (), 1 )
758
+ verifyResponse (t , w , c .getVersion (), 2 )
758
759
checkVersionMapNotSet (t , c )
759
760
760
761
c .CreateWatch (& Request {ResourceNames : []string {"a" , "b" }, TypeUrl : testType , VersionInfo : c .getVersion ()}, sotwState , w )
@@ -775,6 +776,6 @@ func TestLinearMixedWatches(t *testing.T) {
775
776
assert .NoError (t , err )
776
777
checkVersionMapSet (t , c )
777
778
778
- verifyResponse (t , w , c .getVersion (), 0 )
779
+ verifyResponse (t , w , c .getVersion (), 1 )
779
780
verifyDeltaResponse (t , wd , nil , []string {"b" })
780
781
}
0 commit comments