aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google
diff options
context:
space:
mode:
authorGravatar mstaib <mstaib@google.com>2018-06-12 15:20:43 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-06-12 15:22:28 -0700
commit686de84ea61bbc58277e6023222c8230f69d54d5 (patch)
treecf1ef903ed5d84c36bd07ff84929af52ed8f35f3 /src/test/java/com/google
parentdba36c8bec353943fa91d60b5819642deaa53ead (diff)
Add more data to the exception thrown when putOnlyEntry's verification fails.
If this exception is thrown, performance no longer matters - we're detonating the place and riding the explosion out to stderr. So we might as well just dump everything we know. RELNOTES: None. PiperOrigin-RevId: 200290439
Diffstat (limited to 'src/test/java/com/google')
-rw-r--r--src/test/java/com/google/devtools/build/lib/skyframe/ConfigurationsForTargetsTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/ConfigurationsForTargetsTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/ConfigurationsForTargetsTest.java
index 9cf22d8555..79fdc5f56e 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/ConfigurationsForTargetsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/ConfigurationsForTargetsTest.java
@@ -289,13 +289,13 @@ public class ConfigurationsForTargetsTest extends AnalysisTestCase {
ConfigurationResolver.putOnlyEntry(map, "foo", "baz");
fail("Expected an exception when trying to add a new value to an existing key");
} catch (VerifyException e) {
- assertThat(e).hasMessage("couldn't insert baz: map already has key foo");
+ assertThat(e).hasMessage("couldn't insert baz: map already has values for key foo: [bar]");
}
try {
ConfigurationResolver.putOnlyEntry(map, "foo", "bar");
fail("Expected an exception when trying to add a pre-existing <key, value> pair");
} catch (VerifyException e) {
- assertThat(e).hasMessage("couldn't insert bar: map already has key foo");
+ assertThat(e).hasMessage("couldn't insert bar: map already has values for key foo: [bar]");
}
}