Skip to content

Commit 15b43c8

Browse files
authored
Merge pull request #6363 from rzlink/fix-flaky-llbmountperformance-test-windows
Fix flaky TestLLBMountPerformance test on Windows
2 parents 5636893 + 0382c81 commit 15b43c8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

client/client_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11911,8 +11911,6 @@ func testSourcePolicy(t *testing.T, sb integration.Sandbox) {
1191111911
}
1191211912

1191311913
func testLLBMountPerformance(t *testing.T, sb integration.Sandbox) {
11914-
// flaky on WS2025 and moby/moby too
11915-
integration.SkipOnPlatform(t, "windows")
1191611914
c, err := New(sb.Context(), sb.Address())
1191711915
require.NoError(t, err)
1191811916
defer c.Close()
@@ -11923,7 +11921,9 @@ func testLLBMountPerformance(t *testing.T, sb integration.Sandbox) {
1192311921
mntInput := llb.Image(imgName)
1192411922
st := llb.Image(imgName)
1192511923
var mnts []llb.State
11926-
for range 20 {
11924+
// Reduce iterations on Windows due to significantly slower container operations
11925+
numIterations := integration.UnixOrWindows(20, 5)
11926+
for range numIterations {
1192711927
execSt := st.Run(
1192811928
llb.Args(integration.UnixOrWindows(
1192911929
[]string{"true"},
@@ -11940,8 +11940,9 @@ func testLLBMountPerformance(t *testing.T, sb integration.Sandbox) {
1194011940
def, err := st.Marshal(sb.Context())
1194111941
require.NoError(t, err)
1194211942

11943-
// Windows images take longer time
11944-
timeout := integration.UnixOrWindows(time.Minute, 3*time.Minute)
11943+
// Windows images take longer time, especially on CI systems
11944+
// With reduced iterations (5 vs 20), use generous timeout
11945+
timeout := integration.UnixOrWindows(time.Minute, 10*time.Minute)
1194511946
timeoutCtx, cancel := context.WithTimeoutCause(sb.Context(), timeout, nil)
1194611947
defer cancel()
1194711948
_, err = c.Solve(timeoutCtx, def, SolveOpt{}, nil)

0 commit comments

Comments
 (0)