diff options
author | nharmata <nharmata@google.com> | 2018-03-30 15:04:38 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-03-30 15:06:26 -0700 |
commit | 351efff214898300b0f8d320d2e7085716faed38 (patch) | |
tree | b54cdcb212621630f0f01aaf63729bca028a9dec | |
parent | b5e893a51cff0f555ed56d05193a32630b09fb89 (diff) |
Don't test for reference equality of the underlying IOException. It's overkill for these unit tests.
RELNOTES: None
PiperOrigin-RevId: 191122418
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java index 07c7062462..db71edaf96 100644 --- a/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java +++ b/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java @@ -696,7 +696,7 @@ public class PackageFunctionTest extends BuildViewTestCase { String errorMessage = errorInfo.getException().getMessage(); assertThat(errorMessage).contains("nope"); assertThat(errorInfo.getException()).isInstanceOf(NoSuchPackageException.class); - assertThat(errorInfo.getException()).hasCauseThat().isSameAs(exn); + assertThat(errorInfo.getException()).hasCauseThat().isInstanceOf(IOException.class); } @Test @@ -714,7 +714,7 @@ public class PackageFunctionTest extends BuildViewTestCase { String errorMessage = errorInfo.getException().getMessage(); assertThat(errorMessage).contains("nope"); assertThat(errorInfo.getException()).isInstanceOf(NoSuchPackageException.class); - assertThat(errorInfo.getException()).hasCauseThat().isSameAs(exn); + assertThat(errorInfo.getException()).hasCauseThat().isInstanceOf(IOException.class); } private static class CustomInMemoryFs extends InMemoryFileSystem { |