Skip to content

Commit

Permalink
Cleanup of how we report failures
Browse files Browse the repository at this point in the history
  • Loading branch information
DavyLandman committed Feb 29, 2024
1 parent b2576d7 commit fbf0f20
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.fail;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
Expand All @@ -27,10 +26,8 @@
import java.util.HashMap;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ArgumentsSource;

import io.usethesource.vallang.ArgumentsMaxDepth;
import io.usethesource.vallang.ArgumentsMaxWidth;
import io.usethesource.vallang.ExpectedType;
Expand Down Expand Up @@ -190,7 +187,7 @@ public void testDeepRandomValuesIO(IValueFactory vf, TypeStore ts, IValue val) t
ValueStreams.bottomupbf(val).forEach(v -> {
try {
ioRoundTrip(vf, ts, v);
} catch (IOException error) {
} catch (Throwable error) {
fail(error);
}
});
Expand Down Expand Up @@ -249,7 +246,7 @@ private void ioRoundTrip(IValueFactory vf, TypeStore ts, IValue value) throws IO
ioRoundTrip(vf, ts, value, rate);
}
catch (Throwable e) {
throw new RuntimeException("Error with "+ rate + " compression", e);
fail("Error with "+ rate + " compression", e);
}
}
}
Expand Down Expand Up @@ -295,7 +292,7 @@ private void ioRoundTripFile(IValueFactory vf, TypeStore ts, IValue value) throw
ioRoundTripFile(vf, ts, value, rate);
}
catch (Throwable e) {
throw new RuntimeException("Error with "+ rate + " compression", e);
fail("Error with "+ rate + " compression", e);
}
}
}
Expand Down Expand Up @@ -327,7 +324,7 @@ private void ioRoundTripFile2(IValueFactory vf, TypeStore ts, IValue value) thro
ioRoundTripFile2(vf, ts, value, rate);
}
catch (Throwable e) {
throw new RuntimeException("Error with "+ rate + " compression", e);
fail("Error with "+ rate + " compression", e);
}
}
}
Expand Down

0 comments on commit fbf0f20

Please sign in to comment.