From 6f340a46eaabb1131900e435be687625574e71f4 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Fri, 6 Dec 2024 03:25:03 +0530 Subject: [PATCH] - --- internal/helpers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/helpers.go b/internal/helpers.go index 838bd5c30..a6f076760 100644 --- a/internal/helpers.go +++ b/internal/helpers.go @@ -363,6 +363,7 @@ func readFile(t *testing.T, name string) string { // We have observed flakyness when using this function to read certain notebooks // stored in ./testdata. This are debugging logs to help diagnose the issue // when it occurs again. + origErr := err t.Logf("Error reading file %s: %w", name, err) err := filepath.Walk(".", func(path string, info fs.FileInfo, err error) error { if info.IsDir() { @@ -375,6 +376,8 @@ func readFile(t *testing.T, name string) string { if err != nil { t.Logf("Error walking directory: %w", err) } + t.Fatalf("Ending test because of failure to read file %s: %w", name, origErr) + return "" } }