Skip to content

Commit 7638333

Browse files
kellerbCQ Bot
authored andcommitted
[system-tests] Reconnect sl4f client when retrying OTA
Bug: 109811 Change-Id: I18bfefba38358c06578a0cf0aaa0bc5c8e463eff Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/742542 Reviewed-by: Erick Tryzelaar <[email protected]> Commit-Queue: Erick Tryzelaar <[email protected]>
1 parent de12779 commit 7638333

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/sys/pkg/tests/system-tests/upgrade_test/upgrade_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,16 @@ func doTestOTAs(
239239
return fmt.Errorf("failed to create ota test client: %w", err)
240240
}
241241
*device = *newClient
242+
243+
if rpcClient != nil && *rpcClient != nil {
244+
(*rpcClient).Close()
245+
*rpcClient = nil
246+
}
247+
248+
*rpcClient, err = device.StartRpcSession(ctx, repo)
249+
if err != nil {
250+
return fmt.Errorf("unable to connect to sl4f while retrying OTA: %w", err)
251+
}
242252
}
243253

244254
if !successfulNMinusOneToN {

0 commit comments

Comments
 (0)