Skip to content

Commit

Permalink
Geode-8705: Fixing some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Udo Kohlmeyer committed Jul 27, 2021
1 parent de72b32 commit b9bd6be
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 deletions.
Expand Up @@ -92,7 +92,7 @@ public void listAll() {
.containsExactlyInAnyOrder("lib.jar", "lib.jar");
resultAssert.hasRuntimeInfos().extracting(DeploymentInfo::getJarLocation).extracting(
FilenameUtils::getName)
.containsExactlyInAnyOrder("lib.v1.jar", "lib.v1.jar");
.containsExactlyInAnyOrder("lib.jar", "lib.jar");
}

@Test
Expand All @@ -105,7 +105,7 @@ public void listByGroup() throws Exception {
resultAssert.hasConfigurations().extracting(Deployment::getFileName)
.containsExactlyInAnyOrder("lib.jar");
resultAssert.hasRuntimeInfos().extracting(DeploymentInfo::getJarLocation).extracting(
FilenameUtils::getName).containsExactlyInAnyOrder("lib.v1.jar");
FilenameUtils::getName).containsExactlyInAnyOrder("lib.jar");
}

@Test
Expand All @@ -120,7 +120,7 @@ public void listById() throws Exception {
resultAssert.hasRuntimeInfos()
.extracting(DeploymentInfo::getJarLocation).extracting(
FilenameUtils::getName)
.containsExactlyInAnyOrder("lib.v1.jar", "lib.v1.jar");
.containsExactlyInAnyOrder("lib.jar", "lib.jar");
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion geode-deployment/geode-deployment-acceptance/build.gradle
Expand Up @@ -48,7 +48,7 @@ def dependentProjectNames = [
]

docker {
dependsOn(project(":geode-assembly").tasks.installDist)
dependsOn(project(":geode-assembly").tasks.installDistributedTestDist)
name "modulargeode:develop"
copySpec.from(file("modularDocker/launch.sh")).into("/")
copySpec.from(project(":geode-assembly").tasks.installDist.outputs).into('geode')
Expand Down
Expand Up @@ -145,11 +145,16 @@ public void verifyServer(MemberVM serverVM) {
.map(jar -> jar.replaceAll("\\.v\\d+\\.jar", ".jar")).collect(toSet());

// We will end up with extra jars on disk if they are deployed and then undeployed
assertThat(expectedJarNames).isSubsetOf(actualJarNames);
// assertThat(expectedJarNames).isSubsetOf(actualJarNames);

// verify config exists in memory
serverVM.invoke(() -> {
Cache cache = GemFireCacheImpl.getInstance();
List<String> actualDeployedJars =
ClassPathLoader.getLatest().getJarDeploymentService().listDeployed().stream()
.map(deployment -> deployment.getFileName()).collect(Collectors.toList());

assertThat(actualDeployedJars).containsExactlyInAnyOrderElementsOf(expectedJarNames);

// TODO: set compare to fail if there are extra regions
for (String region : this.getRegions()) {
Expand Down
Expand Up @@ -108,7 +108,10 @@ public synchronized ProcessHolder launchVM(String version, int vmNum, boolean bo
envp = new String[] {"GEODE_HOME=" + versionManager.getInstall(version)};
processBuilder.environment().put("GEODE_HOME", versionManager.getInstall(version));
}
Process process = Runtime.getRuntime().exec(cmd, envp, workingDir);
Process process = processBuilder.directory(workingDir)
// .inheritIO()
.command(cmd)
.start();
pendingVMs++;
ProcessHolder holder = new ProcessHolder(process);
processes.put(vmNum, holder);
Expand Down
Expand Up @@ -41,7 +41,7 @@
import org.apache.geode.test.junit.rules.serializable.SerializableTestName;

@Category(WanTest.class)
public class AlterRegionCommandDUnitTest {
public class AlterRegionCommandWithWANDUnitTest {
private static MemberVM locator;

@Rule
Expand Down
Expand Up @@ -33,7 +33,7 @@
import org.apache.geode.test.junit.rules.serializable.SerializableTestName;

@Category({WanTest.class})
public class CreateRegionCommandDUnitTest {
public class CreateRegionCommandWithWanDUnitTest {
private static MemberVM locator, server1, server2;

@Rule
Expand Down

0 comments on commit b9bd6be

Please sign in to comment.