Skip to content

Commit 6fedff9

Browse files
committed
fix: update test timeouts
1 parent fc6e771 commit 6fedff9

File tree

6 files changed

+7
-22
lines changed

6 files changed

+7
-22
lines changed

.github/workflows/verify-examples.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
for dir in $CHANGED_EXAMPLES; do
6060
(cd $dir && echo ">> $dir" && \
6161
if [ $(expr "$($SKAFFOLD_BINARY inspect build-env list)" : '.*"type":"local".*') -gt 0 ]; then \
62-
$SKAFFOLD_BINARY build --push=false; \
62+
$SKAFFOLD_BINARY build --push=false --cache-artifacts=false; \
6363
else \
6464
echo "skipping $dir: not local build-env"; \
6565
fi) \

integration/control_api_test.go

-5
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ func TestControlAPIManualTriggers(t *testing.T) {
4545

4646
rpcClient, entries := apiEvents(t, rpcAddr)
4747

48-
// throw away first 5 entries of log (from first run of dev loop)
49-
for i := 0; i < 5; i++ {
50-
<-entries
51-
}
52-
5348
dep := client.GetDeployment(testDev)
5449

5550
// Make a change to foo

integration/dev_test.go

+1-8
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ func TestDevAPITriggers(t *testing.T) {
150150
skaffold.Dev("--auto-build=false", "--auto-sync=false", "--auto-deploy=false", "--rpc-port", rpcAddr, "--cache-artifacts=false").InDir("testdata/dev").InNs(ns.Name).RunBackground(t)
151151

152152
rpcClient, entries := apiEvents(t, rpcAddr)
153-
154153
dep := client.GetDeployment(testDev)
155154

156155
// Make a change to foo
@@ -194,12 +193,6 @@ func TestDevAPIAutoTriggers(t *testing.T) {
194193
skaffold.Dev("--auto-build=false", "--auto-sync=false", "--auto-deploy=false", "--rpc-port", rpcAddr, "--cache-artifacts=false").InDir("testdata/dev").InNs(ns.Name).RunBackground(t)
195194

196195
rpcClient, entries := apiEvents(t, rpcAddr)
197-
198-
// throw away first 5 entries of log (from first run of dev loop)
199-
for i := 0; i < 5; i++ {
200-
<-entries
201-
}
202-
203196
dep := client.GetDeployment(testDev)
204197

205198
// Make a change to foo
@@ -237,7 +230,7 @@ func verifyDeployment(t *testing.T, entries chan *proto.LogEntry, client *NSKube
237230
failNowIfError(t, err)
238231

239232
// Make sure the old Deployment and the new Deployment are different
240-
err = wait.Poll(time.Millisecond*500, 1*time.Minute, func() (bool, error) {
233+
err = wait.Poll(5*time.Second, 3*time.Minute, func() (bool, error) {
241234
newDep := client.GetDeployment(testDev)
242235
t.Logf("old gen: %d, new gen: %d", dep.GetGeneration(), newDep.GetGeneration())
243236
return dep.GetGeneration() != newDep.GetGeneration(), nil

integration/rpc_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ func setupRPCClient(t *testing.T, port string) proto.SkaffoldServiceClient {
437437

438438
// connect to the skaffold grpc server
439439
for i := 0; i < connectionRetries; i++ {
440-
conn, err = grpc.Dial(fmt.Sprintf(":%s", port), grpc.WithInsecure(), grpc.WithBackoffMaxDelay(10*time.Second))
440+
conn, err = grpc.Dial(fmt.Sprintf(":%s", port), grpc.WithInsecure())
441441
if err != nil {
442442
t.Logf("unable to establish skaffold grpc connection: retrying...")
443443
time.Sleep(waitTime)

integration/sync_test.go

-6
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,8 @@ func TestDevSyncAPITrigger(t *testing.T) {
202202

203203
rpcAddr := randomPort()
204204
skaffold.Dev("--auto-sync=false", "--rpc-port", rpcAddr).InDir("testdata/file-sync").WithConfig("skaffold-manual.yaml").InNs(ns.Name).RunBackground(t)
205-
206205
rpcClient, entries := apiEvents(t, rpcAddr)
207206

208-
// throw away first 5 entries of log (from first run of dev loop)
209-
for i := 0; i < 5; i++ {
210-
<-entries
211-
}
212-
213207
client.WaitForPodsReady("test-file-sync")
214208

215209
ioutil.WriteFile("testdata/file-sync/foo", []byte("foo"), 0644)

integration/util.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,10 @@ func (k *NSKubernetesClient) waitForDeploymentsToStabilizeWithTimeout(timeout ti
337337
k.t.Fatalf("Timed out waiting for deployments %v to stabilize in namespace %s", depNames, k.ns)
338338

339339
case event := <-w.ResultChan():
340-
dp := event.Object.(*appsv1.Deployment)
340+
dp, ok := event.Object.(*appsv1.Deployment)
341+
if !ok {
342+
continue
343+
}
341344
desiredReplicas := *(dp.Spec.Replicas)
342345
log.Entry(ctx).Infof("Deployment %s: Generation %d/%d, Replicas %d/%d, Available %d/%d",
343346
dp.Name,

0 commit comments

Comments
 (0)