Skip to content

Commit

Permalink
migrated test-harness module to springboot;
Browse files Browse the repository at this point in the history
removed es5-persistence module;
rely on SB dependency management plugin for common library dep versions
  • Loading branch information
apanicker-nflx committed Nov 26, 2020
1 parent c5c56a3 commit 017ad34
Show file tree
Hide file tree
Showing 185 changed files with 4,933 additions and 22,891 deletions.
2 changes: 1 addition & 1 deletion azureblob-storage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter'

implementation "com.azure:azure-storage-blob:${revAzureStorageBlobSdk}"
implementation "org.apache.commons:commons-lang3:${revCommonsLang3}"
implementation "org.apache.commons:commons-lang3"
}
2 changes: 1 addition & 1 deletion cassandra-persistence/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter'

implementation "com.datastax.cassandra:cassandra-driver-core:${revCassandra}"
implementation "org.apache.commons:commons-lang3:${revCommonsLang3}"
implementation "org.apache.commons:commons-lang3"
implementation "javax.inject:javax.inject:1"

testImplementation("org.cassandraunit:cassandra-unit:${revCassandraUnit}") {
Expand Down
5 changes: 2 additions & 3 deletions client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ dependencies {
// SBMTODO: remove guava dep
implementation "com.google.guava:guava:${revGuava}"

// SBMTODO: remove jersey dep
implementation "com.sun.jersey:jersey-client:1.19.4"

implementation "com.netflix.spectator:spectator-api:${revSpectator}"
Expand All @@ -17,8 +16,8 @@ dependencies {

implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider"

implementation "org.apache.commons:commons-lang3:${revCommonsLang3}"
implementation "commons-io:commons-io:${revCommonsIo}"
implementation "org.apache.commons:commons-lang3"
implementation "commons-io:commons-io"

implementation "org.slf4j:slf4j-api"
}
8 changes: 4 additions & 4 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-validation'

implementation "org.apache.commons:commons-lang3:${revCommonsLang3}"
implementation "org.apache.commons:commons-lang3"

implementation "com.github.rholder:guava-retrying:${revGuavaRetrying}"

implementation "org.apache.bval:bval-jsr:${revBval}"
implementation "org.apache.bval:bval-jsr"

implementation "com.google.protobuf:protobuf-java:${revProtoBuf}"
implementation "com.github.vmg.protogen:protogen-annotations:${revProtogenAnnotations}"

implementation "com.fasterxml.jackson.core:jackson-databind:${revJackson}"
implementation "com.fasterxml.jackson.core:jackson-core:${revJackson}"
implementation "com.fasterxml.jackson.core:jackson-databind"
implementation "com.fasterxml.jackson.core:jackson-core"
}

import com.github.vmg.protogen.ProtoGenTask
Expand Down
2 changes: 1 addition & 1 deletion contribs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies {
implementation "com.amazonaws:aws-java-sdk-s3:${revAwsSdk}"
implementation "com.amazonaws:aws-java-sdk-sqs:${revAwsSdk}"

implementation "org.apache.commons:commons-lang3:${revCommonsLang3}"
implementation "org.apache.commons:commons-lang3:"

implementation "net.thisptr:jackson-jq:${revJq}"
// SBMTODO: remove guava dep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ public static void setup() {

doAnswer((Answer<Void>) invocation -> {
List<Message> msgs = invocation.getArgument(0, List.class);
System.out.println("got messages to publish: " + msgs);
messages.addAll(msgs);
return null;
}).when(queue).publish(any());
Expand All @@ -118,7 +117,6 @@ public static void setup() {
doReturn(workflow2).when(executionService).getExecutionStatus(eq("v_2"), anyBoolean());

doAnswer((Answer<Void>) invocation -> {
System.out.println("Updating task: " + invocation.getArgument(0, Task.class));
updatedTasks.add(invocation.getArgument(0, Task.class));
return null;
}).when(executionService).updateTask(any(Task.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,15 +375,12 @@ public void handle(String target, Request baseRequest, HttpServletRequest reques
writer.flush();
writer.close();
} else if (request.getMethod().equals("POST") && request.getRequestURI().equals("/post2")) {
System.out.println("==================================== received request from client");
response.addHeader("Content-Type", "application/json");
response.setStatus(204);
BufferedReader reader = request.getReader();
Map<String, Object> input = objectMapper.readValue(reader, mapOfObj);
Set<String> keys = input.keySet();
System.out.println(keys);
response.getWriter().close();

} else if (request.getMethod().equals("GET") && request.getRequestURI().equals("/numeric")) {
PrintWriter writer = response.getWriter();
writer.print(NUM_RESPONSE);
Expand Down
8 changes: 4 additions & 4 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ dependencies {
implementation "com.fasterxml.jackson.core:jackson-annotations"
implementation "com.fasterxml.jackson.core:jackson-databind"

implementation "commons-io:commons-io:${revCommonsIo}"
implementation "commons-io:commons-io"

implementation "com.google.protobuf:protobuf-java:${revProtoBuf}"

implementation "org.apache.commons:commons-lang3:${revCommonsLang3}"
implementation "org.apache.commons:commons-lang3"

implementation "com.fasterxml.jackson.core:jackson-core:${revJackson}"
implementation "com.fasterxml.jackson.core:jackson-core"

implementation "com.spotify:completable-futures:${revSpotifyCompletableFutures}"

Expand All @@ -23,7 +23,7 @@ dependencies {
implementation "com.netflix.servo:servo-core:${revServo}"
implementation "com.netflix.spectator:spectator-api:${revSpectator}"

implementation "org.apache.bval:bval-jsr:${revBval}"
implementation "org.apache.bval:bval-jsr"

implementation "javax.inject:javax.inject:1"
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,18 @@ public AdminServiceImpl(ConductorProperties properties, ExecutionService executi
this.version = "UNKNOWN";
this.buildDate = "UNKNOWN";

try (
InputStream propertiesIs = this.getClass().getClassLoader()
.getResourceAsStream("META-INF/conductor-core.properties")
) {
Properties prop = new Properties();
prop.load(propertiesIs);
this.version = prop.getProperty("Implementation-Version");
this.buildDate = prop.getProperty("Build-Date");
} catch (Exception e) {
LOGGER.error("Error loading properties", e);
}
// SBMTODO: remove
// try (
// InputStream propertiesIs = this.getClass().getClassLoader()
// .getResourceAsStream("META-INF/conductor-core.properties")
// ) {
// Properties prop = new Properties();
// prop.load(propertiesIs);
// this.version = prop.getProperty("Implementation-Version");
// this.buildDate = prop.getProperty("Build-Date");
// } catch (Exception e) {
// LOGGER.error("Error loading properties", e);
// }
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ public void start(Workflow workflow, Task task, WorkflowExecutor executor) {
AtomicInteger queuedTaskCount = new AtomicInteger(0);
final Answer answer = invocation -> {
String queueName = invocation.getArgument(0, String.class);
System.out.println(queueName);
queuedTaskCount.incrementAndGet();
return null;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public void testReplace() throws Exception {

Map<String, Object> replaced = parametersUtils.replace(input, jsonObj);
assertNotNull(replaced);
System.out.println("testNoExpand(): " + replaced);

assertEquals("{\"taskRefName\":\"t001\",\"workflowId\":\"w002\"}", replaced.get("k1"));
assertEquals("conductor", replaced.get("k4"));
Expand Down
9 changes: 1 addition & 8 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,29 @@ ext {
revAwaitility = '3.1.6'
revAwsSdk = '1.11.86'
revAzureStorageBlobSdk = '12.2.0'
revBval = '2.0.4'
revCassandra = '3.10.2'
revCassandraUnit = '3.11.2.0'
revCommonsIo = '2.7'
revCommonsLang3 = '3.11'
revCuratorRecipes = '2.4.0'
revCuratorTest = '2.4.0'
revDockerCompose = '0.13.4'
revDynoQueues = '2.0.20'
revElasticSearch6 = '6.8.12'
revEmbeddedRedis = '0.6'
revEurekaClient = '1.10.10'
revFlywayCore = '4.0.3'
revGroovy = '2.5.13'
revGrpc = '1.33.+'
revGuava = '30.0-jre'
revGuavaRetrying = '2.0.0'
revHikariCP = '3.2.0'
revHealth = '1.1.+'
revJackson = '2.11.0'
revJedis = '3.3.0'
revJettyServer = '9.4.34.v20201102'
revJettyServlet = '9.4.34.v20201102'
revJsonPath = '2.4.0'
revJq = '0.0.12'
revJsr311Api = '1.1.1'
revKafka = '2.6.0'
revMySqlConnector = '8.0.22'
revNatsStreaming = '0.5.0'
revOpenapi = '1.4.+'
revPostgres = '42.2.18'
revProtoBuf = '3.13.0'
revProtogenAnnotations = '1.0.0'
revProtogenCodegen = '1.4.0'
Expand All @@ -47,4 +39,5 @@ ext {
revSpectator = '0.114.0'
revSpock = '1.3-groovy-2.5'
revSpotifyCompletableFutures = '0.3.3'
revTestESContainer = '1.15.0'
}
73 changes: 0 additions & 73 deletions es5-persistence/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions es5-persistence/build.gradle

This file was deleted.

Loading

0 comments on commit 017ad34

Please sign in to comment.