From 7a0003c87c766e6cda8523f4a75230000f84ea24 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Sun, 10 Dec 2023 09:56:09 -0800 Subject: [PATCH] run e2ecli watch tests serially --- e2etests-cli/main_test.go | 17 ++++++++++++----- .../TestCLI_E2E/internal_linked_pdf.exp.pdf | Bin 80081 -> 80081 bytes 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/e2etests-cli/main_test.go b/e2etests-cli/main_test.go index ba496253a..098a82865 100644 --- a/e2etests-cli/main_test.go +++ b/e2etests-cli/main_test.go @@ -30,6 +30,7 @@ func TestCLI_E2E(t *testing.T) { tca := []struct { name string + serial bool skipCI bool skip bool run func(t *testing.T, ctx context.Context, dir string, env *xos.Env) @@ -661,7 +662,8 @@ i used to read }, }, { - name: "watch-regular", + name: "watch-regular", + serial: true, run: func(t *testing.T, ctx context.Context, dir string, env *xos.Env) { writeFile(t, dir, "index.d2", ` a -> b @@ -711,7 +713,8 @@ layers: { }, }, { - name: "watch-ok-link", + name: "watch-ok-link", + serial: true, run: func(t *testing.T, ctx context.Context, dir string, env *xos.Env) { // This link technically works because D2 interprets it as a URL, // and on local filesystem, that is whe path where the compilation happens @@ -765,7 +768,8 @@ layers: { }, }, { - name: "watch-bad-link", + name: "watch-bad-link", + serial: true, run: func(t *testing.T, ctx context.Context, dir string, env *xos.Env) { // Just verify we don't crash even with a bad link (it's treated as a URL, which users might have locally) writeFile(t, dir, "index.d2", ` @@ -816,7 +820,8 @@ layers: { }, }, { - name: "watch-imported-file", + name: "watch-imported-file", + serial: true, run: func(t *testing.T, ctx context.Context, dir string, env *xos.Env) { writeFile(t, dir, "a.d2", ` ...@b @@ -895,7 +900,9 @@ c for _, tc := range tca { tc := tc t.Run(tc.name, func(t *testing.T) { - t.Parallel() + if !tc.serial { + t.Parallel() + } if tc.skipCI && os.Getenv("CI") != "" { t.SkipNow() diff --git a/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf b/e2etests-cli/testdata/TestCLI_E2E/internal_linked_pdf.exp.pdf index 3965f73dfe84e91413f8f577f4b79c376b53d753..e0dd241f0657294bdff906f75246b653eeb049ef 100644 GIT binary patch delta 54 zcmcckk>%n?mWC~imrPX*4Gb(zjZMrnx%7SWQ(O{DQWZ2@tc(ndj17%oa@)U|GTvqa E0Q*1?)c^nh delta 54 zcmcckk>%n?mWC~imrPX*Obtzq%}k9nx%7SWQ(O{DQWZ2@tc(ndj17%oa@)U|GTvqa E0Q)cy(*OVf