diff --git a/build.sc b/build.sc index 62d5837..b798e4b 100644 --- a/build.sc +++ b/build.sc @@ -9,9 +9,9 @@ object lsp extends MavenModule with PublishModule { def ivyDeps = Agg( ivy"org.eclipse.lsp4j:org.eclipse.lsp4j:0.14.0", - ivy"software.amazon.smithy:smithy-model:1.41.0", - ivy"software.amazon.smithy:smithy-build:1.41.0", - ivy"software.amazon.smithy:smithy-cli:1.41.0", + ivy"software.amazon.smithy:smithy-model:1.45.0", + ivy"software.amazon.smithy:smithy-build:1.45.0", + ivy"software.amazon.smithy:smithy-cli:1.45.0", ivy"com.disneystreaming.smithy:smithytranslate-formatter-jvm-java-api:0.3.10" ) diff --git a/gradle.properties b/gradle.properties index 590aa87..8b3a8dc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -smithyVersion=1.43.0 +smithyVersion=1.45.0 diff --git a/src/test/java/software/amazon/smithy/lsp/SmithyInterfaceTest.java b/src/test/java/software/amazon/smithy/lsp/SmithyInterfaceTest.java index 9db0e0d..77fd294 100644 --- a/src/test/java/software/amazon/smithy/lsp/SmithyInterfaceTest.java +++ b/src/test/java/software/amazon/smithy/lsp/SmithyInterfaceTest.java @@ -17,7 +17,6 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertEquals; import java.io.File; import java.nio.file.Path; @@ -25,6 +24,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; import org.eclipse.lsp4j.jsonrpc.messages.Either; import org.junit.Test; @@ -105,10 +105,16 @@ public void runValidators() throws Exception { assertTrue(result.isRight()); List validationEvents = result.getRight().getValidationEvents(); assertFalse(validationEvents.isEmpty()); - assertEquals( - "Proto index 1 is used muliple times in members name,age of shape (structure: `some.test#MyStruct`).", - validationEvents.get(0).getMessage() - ); + + String expectedMessage = "Proto index 1 is used muliple times in members name," + + "age of shape (structure: `some.test#MyStruct`)."; + Optional matchingEvent = validationEvents.stream() + .filter(ev ->ev.getMessage().equals(expectedMessage)).findFirst(); + + if (!matchingEvent.isPresent()) { + throw new AssertionError("Expected validation event with message `" + expectedMessage + + "`, but events were " + validationEvents); + } } private static List getFiles(String... filenames) throws Exception {