forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4f7ca3
commit d3a936a
Showing
6 changed files
with
155 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
core/deployment/src/test/java/io/quarkus/deployment/runnerjar/ReloadableFlagsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package io.quarkus.deployment.runnerjar; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import java.util.Set; | ||
import java.util.stream.Collectors; | ||
|
||
import org.eclipse.aether.util.artifact.JavaScopes; | ||
|
||
import io.quarkus.bootstrap.model.ApplicationModel; | ||
import io.quarkus.bootstrap.resolver.TsArtifact; | ||
import io.quarkus.bootstrap.resolver.TsQuarkusExt; | ||
import io.quarkus.bootstrap.workspace.WorkspaceModule; | ||
import io.quarkus.bootstrap.workspace.WorkspaceModuleId; | ||
import io.quarkus.maven.dependency.ArtifactCoords; | ||
import io.quarkus.maven.dependency.ArtifactDependency; | ||
import io.quarkus.maven.dependency.Dependency; | ||
import io.quarkus.maven.dependency.DependencyFlags; | ||
|
||
public class ReloadableFlagsTest extends BootstrapFromOriginalJarTestBase { | ||
|
||
@Override | ||
protected TsArtifact composeApplication() { | ||
|
||
System.setProperty("parallel", "true"); | ||
|
||
var transitive = TsArtifact.jar("acme-transitive"); | ||
addWorkspaceModule(transitive); | ||
addToExpectedLib(transitive); | ||
|
||
var common = TsArtifact.jar("acme-common"); | ||
common.addDependency(transitive); | ||
addWorkspaceModule(common); | ||
addToExpectedLib(common); | ||
|
||
var lib = TsArtifact.jar("acme-lib"); | ||
lib.addDependency(common); | ||
addWorkspaceModule(lib); | ||
addToExpectedLib(lib); | ||
|
||
var externalLib = TsArtifact.jar("external-lib"); | ||
externalLib.addDependency(common); | ||
addToExpectedLib(externalLib); | ||
|
||
var myExt = new TsQuarkusExt("my-ext"); | ||
addToExpectedLib(myExt.getRuntime()); | ||
|
||
return TsArtifact.jar("app") | ||
.addManagedDependency(platformDescriptor()) | ||
.addManagedDependency(platformProperties()) | ||
.addDependency(common) | ||
.addDependency(lib) | ||
.addDependency(externalLib) | ||
.addDependency(myExt); | ||
} | ||
|
||
@Override | ||
protected void assertAppModel(ApplicationModel model) { | ||
assertThat(model.getWorkspaceModules().stream().map(WorkspaceModule::getId).collect(Collectors.toSet())) | ||
.isEqualTo(Set.of( | ||
WorkspaceModuleId.of(TsArtifact.DEFAULT_GROUP_ID, "acme-transitive", TsArtifact.DEFAULT_VERSION), | ||
WorkspaceModuleId.of(TsArtifact.DEFAULT_GROUP_ID, "acme-common", TsArtifact.DEFAULT_VERSION), | ||
WorkspaceModuleId.of(TsArtifact.DEFAULT_GROUP_ID, "acme-lib", TsArtifact.DEFAULT_VERSION), | ||
WorkspaceModuleId.of(TsArtifact.DEFAULT_GROUP_ID, "app", TsArtifact.DEFAULT_VERSION))); | ||
|
||
final Set<Dependency> expected = Set.of( | ||
new ArtifactDependency(ArtifactCoords.jar("io.quarkus.bootstrap.test", "acme-lib", "1"), JavaScopes.COMPILE, | ||
DependencyFlags.RUNTIME_CP, DependencyFlags.DEPLOYMENT_CP, DependencyFlags.DIRECT, | ||
DependencyFlags.RELOADABLE, DependencyFlags.WORKSPACE_MODULE)); | ||
|
||
assertThat(getDependenciesWithFlag(model, DependencyFlags.RELOADABLE)).isEqualTo(expected); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.