@@ -192,8 +192,8 @@ var _ = Describe("With an in-process Server", func() {
192
192
// simulates a second connection and check that that also converges to the given state.
193
193
expectClientState := func (c * ClientState , status api.SyncStatus , kvs map [string ]api.Update ) {
194
194
// Wait until we reach that state.
195
- Eventually ( c .recorder .Status ).Should (Equal (status ))
196
- Eventually ( c .recorder .KVs ).Should (Equal (kvs ))
195
+ EventuallyWithOffset ( 1 , c .recorder .Status ).Should (Equal (status ), "Unexpected sync status" )
196
+ EventuallyWithOffset ( 1 , c .recorder .KVs ).Should (Equal (kvs ), "Unexpected KVs" )
197
197
198
198
// Now, a newly-connecting client should also reach the same state.
199
199
log .Info ("Starting transient client to read snapshot." )
@@ -303,7 +303,7 @@ var _ = Describe("With an in-process Server", func() {
303
303
},
304
304
)
305
305
// Our updates shouldn't affect the felix syncer.
306
- expectFelixClientState (api .WaitForDatastore , map [string ]api.Update {})
306
+ expectFelixClientState (api .ResyncInProgress , map [string ]api.Update {})
307
307
},
308
308
Entry ("IP pool" , ipPool1 , "/calico/v1/ipam/v4/pool/10.0.1.0-24" ),
309
309
Entry ("Node conf" , nodeBGPConfNode , "/calico/bgp/v1/host/node1/foo" ),
@@ -404,7 +404,7 @@ var _ = Describe("With an in-process Server", func() {
404
404
})
405
405
406
406
// Simulate an old client.
407
- Describe ("with a client that doesn't support connection restart" , func () {
407
+ Describe ("with a client that doesn't support decoder restart" , func () {
408
408
BeforeEach (func () {
409
409
h .CreateClientNoDecodeRestart ("no decoder restart" , syncproto .SyncerTypeFelix )
410
410
})
@@ -685,49 +685,11 @@ var _ = Describe("With an in-process Server with short ping timeout", func() {
685
685
// interval for the check to take place.
686
686
time .Sleep (1 * time .Second )
687
687
688
- // Check that the client knows it can use node resource updates since the server supports it.
689
- supportsNodeResourceUpdates , err := client .SupportsNodeResourceUpdates (10 * time .Second )
690
- Expect (supportsNodeResourceUpdates ).To (BeTrue ())
691
- Expect (err ).To (BeNil ())
692
-
693
688
// Then send an update.
694
689
h .FelixCache .OnStatusUpdated (api .InSync )
695
690
Eventually (recorder .Status ).Should (Equal (api .InSync ))
696
691
})
697
692
698
- It ("should return an error if client does not receive a server hello in time" , func () {
699
- // Start a real client, which will respond correctly to pings.
700
- clientCxt , clientCancel := context .WithCancel (context .Background ())
701
- recorder := NewRecorder ()
702
-
703
- client := syncclient .New (
704
- h .Discoverer (),
705
- "test-version" ,
706
- "test-host" ,
707
- "test-info" ,
708
- recorder ,
709
- nil ,
710
- )
711
- err := client .Start (clientCxt )
712
- recorderCtx , recorderCancel := context .WithCancel (context .Background ())
713
- defer recorderCancel ()
714
- go recorder .Loop (recorderCtx )
715
- Expect (err ).NotTo (HaveOccurred ())
716
- defer func () {
717
- clientCancel ()
718
- client .Finished .Wait ()
719
- }()
720
-
721
- // Kill the server
722
- h .ServerCancel ()
723
- h .Server .Finished .Wait ()
724
-
725
- // Check that the client knows it can use node resource updates since the server supports it.
726
- supportsNodeResourceUpdates , err := client .SupportsNodeResourceUpdates (0 * time .Second )
727
- Expect (supportsNodeResourceUpdates ).To (BeFalse ())
728
- Expect (err ).NotTo (BeNil ())
729
- })
730
-
731
693
Describe ("with a raw connection" , func () {
732
694
var rawConn net.Conn
733
695
var w * gob.Encoder
@@ -1589,7 +1551,6 @@ var _ = Describe("with server requiring TLS", func() {
1589
1551
1590
1552
if ! expectConnection {
1591
1553
// Client connection should have failed, so should not have got any updates.
1592
- Consistently (clientState .recorder .Status ).Should (Equal (api .SyncStatus (0 )))
1593
1554
Consistently (clientState .recorder .KVs ).Should (Equal (map [string ]api.Update {}))
1594
1555
}
1595
1556
}
0 commit comments