Skip to content

Commit

Permalink
Merge pull request #26038 from gastaldi/revert_app_cds
Browse files Browse the repository at this point in the history
Revert "Add support for appCds type in QuarkusIntegrationTest"
  • Loading branch information
geoand committed Jun 10, 2022
2 parents 2deaf45 + 23a10de commit 48581e9
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 225 deletions.
Expand Up @@ -7,8 +7,8 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.BooleanSupplier;

Expand Down Expand Up @@ -97,8 +97,7 @@ public void build(Optional<AppCDSRequestedBuildItem> appCDsRequested,
}

appCDS.produce(new AppCDSResultBuildItem(appCDSPath));
artifactResult.produce(new ArtifactResultBuildItem(appCDSPath, "appCDS",
Map.of("jar-result-path", jarResult.getPath())));
artifactResult.produce(new ArtifactResultBuildItem(appCDSPath, "appCDS", Collections.emptyMap()));
}

private String determineContainerImage(PackageConfig packageConfig,
Expand Down
Expand Up @@ -230,15 +230,8 @@ private void writeArtifactResultMetadataFile(BuildSystemTargetBuildItem outputTa
Map<String, Object> metadata = lastResult.getMetadata();
if (metadata != null) {
for (Map.Entry<String, Object> entry : metadata.entrySet()) {
String value = null;
if (entry.getValue() instanceof String) {
value = (String) entry.getValue();
} else if (entry.getValue() instanceof Path) {
value = outputTargetBuildItem.getOutputDirectory().relativize((Path) entry.getValue()).toString();
}

if (value != null) {
properties.put("metadata." + entry.getKey(), value);
properties.put("metadata." + entry.getKey(), entry.getValue());
}
}
}
Expand Down
21 changes: 0 additions & 21 deletions integration-tests/main/pom.xml
Expand Up @@ -512,27 +512,6 @@
<runOrder>alphabetical</runOrder>
</configuration>
</plugin>
<plugin>
<artifactId>maven-invoker-plugin</artifactId>
<executions>
<execution>
<id>integration-tests</id>
<goals>
<goal>run</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<cloneClean>true</cloneClean>
<preBuildHookScript>setup</preBuildHookScript>
<postBuildHookScript>verify</postBuildHookScript>
<addTestClassPath>true</addTestClassPath>
<streamLogs>true</streamLogs>
<invokerPropertiesFile>invoker.properties</invokerPropertiesFile>
</configuration>
</plugin>
</plugins>
</build>

Expand Down

This file was deleted.

111 changes: 0 additions & 111 deletions integration-tests/main/src/it/integration-test-for-appcds/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Expand Up @@ -16,8 +16,4 @@ public static boolean isNativeBinary(String artifactType) {
public static boolean isJar(String artifactType) {
return "jar".equals(artifactType);
}

public static boolean isAppCds(String artifactType) {
return "appCDS".equals(artifactType);
}
}

This file was deleted.

Expand Up @@ -27,7 +27,7 @@ public boolean supportsArtifactType(String type) {

@Override
public JarArtifactLauncher create(CreateContext context) {
String pathStr = getPath(context);
String pathStr = context.quarkusArtifactProperties().getProperty("path");
if ((pathStr != null) && !pathStr.isEmpty()) {
JarArtifactLauncher launcher;
ServiceLoader<JarArtifactLauncher> loader = ServiceLoader.load(JarArtifactLauncher.class);
Expand All @@ -44,7 +44,7 @@ public JarArtifactLauncher create(CreateContext context) {
config.getValue("quarkus.http.test-ssl-port", OptionalInt.class).orElse(DEFAULT_HTTPS_PORT),
ConfigUtil.waitTimeValue(config),
config.getOptionalValue("quarkus.test.native-image-profile", String.class).orElse(null),
argLineValue(context, config),
ConfigUtil.argLineValue(config),
context.devServicesLaunchResult(),
context.buildOutputDirectory().resolve(pathStr)));
return launcher;
Expand All @@ -53,14 +53,6 @@ public JarArtifactLauncher create(CreateContext context) {
}
}

protected String getPath(CreateContext context) {
return context.quarkusArtifactProperties().getProperty("path");
}

protected List<String> argLineValue(CreateContext context, Config config) {
return ConfigUtil.argLineValue(config);
}

static class DefaultJarInitContext extends DefaultInitContextBase implements JarArtifactLauncher.JarInitContext {

private final Path jarPath;
Expand Down
@@ -1,4 +1,3 @@
io.quarkus.test.junit.launcher.DockerContainerLauncherProvider
io.quarkus.test.junit.launcher.JarLauncherProvider
io.quarkus.test.junit.launcher.NativeImageLauncherProvider
io.quarkus.test.junit.launcher.AppCdsLauncherProvider

0 comments on commit 48581e9

Please sign in to comment.