Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion internal/update/images_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,13 @@ func TestImageGatesSurviveDirectorySwapAndRecovery(t *testing.T) {
t.Error("update worker did not finish")
}
})
// The two directories are looked at one after the other, not at once. swapIn first renames sdk\emulator
// to previous, then the stage to sdk\emulator; previous stays until finishInstall, which waits for
// metaLock. Looking at sdk\emulator first could see the old one just before the first rename and
// previous just after it, with sdk\emulator missing in between (ModAVD/ModAVD#403). Looking at
// previous first, sdk\emulator seen after it can only be the one the second rename put there.
deadline := time.Now().Add(5 * time.Second)
for !isDir(u.l.emulator()) || !isDir(u.l.previousEmulator()) {
for !isDir(u.l.previousEmulator()) || !isDir(u.l.emulator()) {
select {
case <-done:
t.Fatalf("update ended before metadata commit: %+v %v", result, updateErr)
Expand Down
Loading