@@ -918,22 +918,21 @@ var _ = SIGDescribe("NetworkPolicy [LinuxOnly]", func() {
918
918
919
919
// Creating pods and services in namespace-b
920
920
nsBpodServerA , nsBserviceA = createServerPodAndService (f , nsB , "ns-b-server-a" , []int {80 })
921
+ defer cleanupServerPodAndService (f , nsBpodServerA , nsBserviceA )
921
922
nsBpodServerB , nsBserviceB = createServerPodAndService (f , nsB , "ns-b-server-b" , []int {80 })
923
+ defer cleanupServerPodAndService (f , nsBpodServerB , nsBserviceB )
922
924
923
925
// Wait for Server with Service in NS-A to be ready
924
- framework .Logf ("Waiting for servers to come up ." )
925
- err = e2epod .WaitForPodRunningInNamespace (f .ClientSet , podServer )
926
- framework .ExpectNoError (err , "Error occurred while waiting for pod status in namespace: Running ." )
926
+ framework .Logf ("Waiting for servers to be ready ." )
927
+ err = e2epod .WaitTimeoutForPodReadyInNamespace (f .ClientSet , podServer . Name , podServer . Namespace , framework . PodStartTimeout )
928
+ framework .ExpectNoError (err , "Error occurred while waiting for pod status in namespace: Ready ." )
927
929
928
930
// Wait for Servers with Services in NS-B to be ready
929
- err = e2epod .WaitForPodRunningInNamespace (f .ClientSet , nsBpodServerA )
930
- framework .ExpectNoError (err , "Error occurred while waiting for pod status in namespace: Running ." )
931
+ err = e2epod .WaitTimeoutForPodReadyInNamespace (f .ClientSet , nsBpodServerA . Name , nsBpodServerA . Namespace , framework . PodStartTimeout )
932
+ framework .ExpectNoError (err , "Error occurred while waiting for pod status in namespace: Ready ." )
931
933
932
- err = e2epod .WaitForPodRunningInNamespace (f .ClientSet , nsBpodServerB )
933
- framework .ExpectNoError (err , "Error occurred while waiting for pod status in namespace: Running." )
934
-
935
- defer cleanupServerPodAndService (f , nsBpodServerA , nsBserviceA )
936
- defer cleanupServerPodAndService (f , nsBpodServerB , nsBserviceB )
934
+ err = e2epod .WaitTimeoutForPodReadyInNamespace (f .ClientSet , nsBpodServerB .Name , nsBpodServerB .Namespace , framework .PodStartTimeout )
935
+ framework .ExpectNoError (err , "Error occurred while waiting for pod status in namespace: Ready." )
937
936
938
937
ginkgo .By ("Creating a network policy for the server which allows traffic only to a server in different namespace." )
939
938
protocolUDP := v1 .ProtocolUDP
0 commit comments