Skip to content

Commit

Permalink
Revert "GEODE-7436: Deploy jar using semantic versioning scheme (apac…
Browse files Browse the repository at this point in the history
…he#4343)" (apache#4380)

This reverts commit 0d4c191
  • Loading branch information
jinmeiliao authored Nov 27, 2019
1 parent 6bc6e59 commit 6ad41d3
Show file tree
Hide file tree
Showing 29 changed files with 580 additions and 1,512 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import java.util.concurrent.atomic.AtomicReference;

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
Expand Down Expand Up @@ -217,8 +216,7 @@ private static void assertThatFunctionHasVersion(String functionId, String versi

private static void assertThatCanLoad(String jarName, String className)
throws ClassNotFoundException {
assertThat(ClassPathLoader.getLatest().getJarDeployer()
.getDeployedJar(FilenameUtils.getBaseName(jarName))).isNotNull();
assertThat(ClassPathLoader.getLatest().getJarDeployer().getDeployedJar(jarName)).isNotNull();
assertThat(ClassPathLoader.getLatest().forName(className)).isNotNull();
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,8 @@ public void deployMultipleJarsToOneGroup() throws Exception {
.hasRowSize(4)
.hasAnyRow().contains("server-1", "DeployCommandsDUnit3.jar")
.hasAnyRow().contains("server-1", "DeployCommandsDUnit4.jar")
.hasAnyRow()
.contains("server-2", "DeployCommandsDUnit3.jar", "DeployCommandsDUnit3.jar not deployed")
.hasAnyRow()
.contains("server-2", "DeployCommandsDUnit4.jar", "DeployCommandsDUnit4.jar not deployed");
.hasAnyRow().contains("server-2", "DeployCommandsDUnit3.jar", "JAR not deployed")
.hasAnyRow().contains("server-2", "DeployCommandsDUnit4.jar", "JAR not deployed");
server1.invoke(() -> {
assertThatCannotLoad(jarName3, class3);
assertThatCannotLoad(jarName4, class4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ public void deployNewVersionOfFunctionOverOldVersion() throws Exception {
GemFireCache gemFireCache = server.getCache();
DistributedSystem distributedSystem = gemFireCache.getDistributedSystem();

ClassPathLoader.getLatest().getJarDeployer().deploy(jarVersion1);
ClassPathLoader.getLatest().getJarDeployer().deploy("MyJar.jar", jarVersion1);

assertThatClassCanBeLoaded("jddunit.function.MyFunction");
Execution execution = FunctionService.onMember(distributedSystem.getDistributedMember());

List<String> result = (List<String>) execution.execute("MyFunction").getResult();
assertThat(result.get(0)).isEqualTo("Version1");

ClassPathLoader.getLatest().getJarDeployer().deploy(jarVersion2);
ClassPathLoader.getLatest().getJarDeployer().deploy("MyJar.jar", jarVersion2);
result = (List<String>) execution.execute("MyFunction").getResult();
assertThat(result.get(0)).isEqualTo("Version2");
}
Expand Down
Loading

0 comments on commit 6ad41d3

Please sign in to comment.