This is an automated email from the ASF dual-hosted git repository. placave pushed a commit to branch sampling-guard-test in repository https://gitbox.apache.org/repos/asf/datasketches-go.git
commit 2d2da9d390b568e5e103d9cffdecd25c9f8e004c Author: Pierre Lacave <[email protected]> AuthorDate: Mon Feb 2 19:47:02 2026 +0100 Add guard for test in sampling sketch --- sampling/compatibility_test.go | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/sampling/compatibility_test.go b/sampling/compatibility_test.go index 9777076..d51b7c2 100644 --- a/sampling/compatibility_test.go +++ b/sampling/compatibility_test.go @@ -251,7 +251,12 @@ func TestGenerateGoBinariesForCompatibilityTesting(t *testing.T) { // TestSerializationCompatibilityEmpty tests deserialization of an empty sketch. func TestSerializationCompatibilityEmpty(t *testing.T) { - data, err := os.ReadFile(filepath.Join(internal.GoPath, "reservoir_items_long_empty_k128_go.sk")) + filename := filepath.Join(internal.GoPath, "reservoir_items_long_empty_k128_go.sk") + if _, err := os.Stat(filename); os.IsNotExist(err) { + t.Skipf("Go file not found: %s", filename) + return + } + data, err := os.ReadFile(filename) assert.NoError(t, err) sketch, err := NewReservoirItemsSketchFromSlice[int64](data, Int64SerDe{}) @@ -277,7 +282,12 @@ func TestSerializationCompatibilityExact(t *testing.T) { for _, tc := range testCases { t.Run(tc.filename, func(t *testing.T) { - data, err := os.ReadFile(filepath.Join(internal.GoPath, tc.filename)) + filename := filepath.Join(internal.GoPath, tc.filename) + if _, err := os.Stat(filename); os.IsNotExist(err) { + t.Skipf("Go file not found: %s", filename) + return + } + data, err := os.ReadFile(filename) assert.NoError(t, err) sketch, err := NewReservoirItemsSketchFromSlice[int64](data, Int64SerDe{}) @@ -303,7 +313,12 @@ func TestSerializationCompatibilityWithSampling(t *testing.T) { for _, tc := range testCases { t.Run(tc.filename, func(t *testing.T) { - data, err := os.ReadFile(filepath.Join(internal.GoPath, tc.filename)) + filename := filepath.Join(internal.GoPath, tc.filename) + if _, err := os.Stat(filename); os.IsNotExist(err) { + t.Skipf("Go file not found: %s", filename) + return + } + data, err := os.ReadFile(filename) assert.NoError(t, err) sketch, err := NewReservoirItemsSketchFromSlice[int64](data, Int64SerDe{}) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
