From 50b97ba5f5007d6370b21b7a3eeb4d81604855a1 Mon Sep 17 00:00:00 2001 From: Yannick Welsch Date: Sat, 2 Jul 2016 09:27:07 +0200 Subject: [PATCH] Fix test assertion matching exception message Newer versions of the URL class in JDK 9 use a different exception message when throwing a MalformedURLException due to an unknown protocol. --- .../test/java/org/elasticsearch/snapshots/RepositoriesIT.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/test/java/org/elasticsearch/snapshots/RepositoriesIT.java b/core/src/test/java/org/elasticsearch/snapshots/RepositoriesIT.java index 79d1497912a..980912ecb6d 100644 --- a/core/src/test/java/org/elasticsearch/snapshots/RepositoriesIT.java +++ b/core/src/test/java/org/elasticsearch/snapshots/RepositoriesIT.java @@ -153,7 +153,8 @@ public class RepositoriesIT extends AbstractSnapshotIntegTestCase { .get(); fail("Shouldn't be here"); } catch (RepositoryException ex) { - assertThat(ex.toString(), containsString("unsupported url protocol [netdoc]")); + assertThat(ex.toString(), containsString("Unable to parse URL repository setting")); + assertThat(ex.toString(), containsString("netdoc")); } logger.info("--> trying creating url repository with location that is not registered in path.repo setting");