Skip to content

Commit

Permalink
Merge pull request #1219 from NASA-AMMOS/devops/update-deps
Browse files Browse the repository at this point in the history
Update Aerie Dependencies
  • Loading branch information
Mythicaeda authored Nov 7, 2023
2 parents aeb2d49 + 129627e commit 9ce0eb4
Show file tree
Hide file tree
Showing 22 changed files with 451 additions and 456 deletions.
6 changes: 1 addition & 5 deletions db-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@ task e2eTest(type: Test) {
}

dependencies {
testImplementation 'org.assertj:assertj-core:3.24.2'
implementation 'org.postgresql:postgresql:42.6.0'
testImplementation 'org.postgresql:postgresql:42.6.0'
testImplementation 'com.zaxxer:HikariCP:5.0.1'
testImplementation 'junit:junit:4.13.2'

testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.0'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.0'
testImplementation 'com.zaxxer:HikariCP:5.0.1'
}
1 change: 0 additions & 1 deletion e2e-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ task e2eTest(type: Test) {
dependencies {
testImplementation 'com.microsoft.playwright:playwright:1.37.0'

testImplementation 'org.assertj:assertj-core:3.24.2'
testImplementation 'org.glassfish:javax.json:1.1.4'
testImplementation 'org.apache.commons:commons-lang3:3.13.0'

Expand Down
90 changes: 45 additions & 45 deletions load-tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions merlin-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,15 @@ dependencies {
implementation project(':constraints')
implementation project(':permissions')

implementation 'org.apache.commons:commons-lang3:3.13.0'
implementation 'io.javalin:javalin:5.6.2'
implementation 'io.javalin:javalin:5.6.3'
implementation 'org.slf4j:slf4j-simple:2.0.7'
implementation 'org.glassfish:javax.json:1.1.4'
implementation 'org.apache.bcel:bcel:6.7.0'

implementation 'org.postgresql:postgresql:42.6.0'
implementation 'com.zaxxer:HikariCP:5.0.1'

testImplementation project(':examples:foo-missionmodel')
testImplementation project(':merlin-framework')
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.0'
testImplementation 'org.assertj:assertj-core:3.24.2'
testImplementation 'javax.json.bind:javax.json.bind-api:1.0'
testImplementation 'net.jqwik:jqwik:1.6.5'
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package gov.nasa.jpl.aerie.merlin.server.http;

import gov.nasa.jpl.aerie.json.JsonParseResult;
import gov.nasa.jpl.aerie.json.JsonParser;
import gov.nasa.jpl.aerie.merlin.protocol.types.SerializedValue;
import gov.nasa.jpl.aerie.merlin.server.models.HasuraAction;
Expand All @@ -18,32 +17,22 @@
import static gov.nasa.jpl.aerie.merlin.driver.json.SerializedValueJsonParser.serializedValueP;
import static gov.nasa.jpl.aerie.merlin.server.http.HasuraParsers.*;
import static gov.nasa.jpl.aerie.merlin.server.http.MerlinParsersTest.NestedLists.nestedList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

public final class MerlinParsersTest {
public static final class NestedLists {
public final List<NestedLists> lists;

public NestedLists(final List<NestedLists> lists) {
this.lists = lists;
}
public record NestedLists(List<NestedLists> lists) {

@Override
public boolean equals(final Object obj) {
if (!(obj instanceof NestedLists)) return false;
final var other = (NestedLists) obj;
return Objects.equals(this.lists, other.lists);
}

@Override
public int hashCode() {
return this.lists.hashCode();
}
public boolean equals(final Object obj) {
if (!(obj instanceof final NestedLists other)) return false;
return Objects.equals(this.lists, other.lists);
}

public static NestedLists nestedList(NestedLists... lists) {
return new NestedLists(List.of(lists));
return new NestedLists(List.of(lists));
}
}
}

@Test
public void testRecursiveList() {
Expand All @@ -64,26 +53,23 @@ public void testRecursiveList() {
. build())
. build();

assertThat(
listsP.parse(foo).getSuccessOrThrow()
).isEqualTo(
nestedList(
final var expected = nestedList(
nestedList(nestedList()),
nestedList(nestedList(), nestedList(), nestedList()))
);
nestedList(nestedList(), nestedList(), nestedList()));
assertEquals(expected, listsP.parse(foo).getSuccessOrThrow());
}

@Test
public void testSerializedReal() {
final var expected = SerializedValue.of(3.14);
final var actual = serializedValueP.parse(Json.createValue(3.14)).getSuccessOrThrow();

assertThat(expected).isEqualTo(actual);
assertEquals(expected, actual);
}

@Test
public void testRealIsNotALong() {
assertThat(longP.parse(Json.createValue(3.14))).matches(JsonParseResult::isFailure);
assertTrue(longP.parse(Json.createValue(3.14)).isFailure());
}

@Test
Expand Down Expand Up @@ -111,7 +97,7 @@ public void testHasuraActionParsers() {
new HasuraAction.MissionModelInput("1"),
new HasuraAction.Session("aerie_admin", null));

assertThat(hasuraMissionModelActionP.parse(json).getSuccessOrThrow()).isEqualTo(expected);
assertEquals(expected, hasuraMissionModelActionP.parse(json).getSuccessOrThrow());
}

{
Expand All @@ -138,7 +124,7 @@ public void testHasuraActionParsers() {
new HasuraAction.MissionModelInput("1"),
new HasuraAction.Session("aerie_admin", "userId"));

assertThat(hasuraMissionModelActionP.parse(json).getSuccessOrThrow()).isEqualTo(expected);
assertEquals(expected, hasuraMissionModelActionP.parse(json).getSuccessOrThrow());
}
}

Expand All @@ -163,6 +149,6 @@ public void testHasuraMissionModelEventParser() {

final var expected = new HasuraMissionModelEvent("1");

assertThat(hasuraMissionModelEventTriggerP.parse(json).getSuccessOrThrow()).isEqualTo(expected);
assertEquals(expected, hasuraMissionModelEventTriggerP.parse(json).getSuccessOrThrow());
}
}
Loading

0 comments on commit 9ce0eb4

Please sign in to comment.