You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vv...@apache.org on 2021/10/05 08:55:26 UTC
[ignite-3] branch main updated: IGNITE-15662 It is impossible to
add a test-jar dependency to the CLI module (#375)
This is an automated email from the ASF dual-hosted git repository.
vveider pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new 961ac5f IGNITE-15662 It is impossible to add a test-jar dependency to the CLI module (#375)
961ac5f is described below
commit 961ac5f5551265955ba73c2d6c304ffad114522e
Author: Peter Ivanov <mr...@gmail.com>
AuthorDate: Tue Oct 5 11:55:23 2021 +0300
IGNITE-15662 It is impossible to add a test-jar dependency to the CLI module (#375)
---
modules/cli/pom.xml | 25 ++++++++++++++++++++++
.../org/apache/ignite/cli/ITConfigCommandTest.java | 12 +----------
2 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/modules/cli/pom.xml b/modules/cli/pom.xml
index 300466c..551b239 100644
--- a/modules/cli/pom.xml
+++ b/modules/cli/pom.xml
@@ -122,6 +122,31 @@
</dependency>
</dependencies>
+ <profiles>
+
+ <!--
+ Profile to include test-jar dependency when tests are not skipped
+ -->
+ <profile>
+ <id>include-testjar-dependency</id>
+ <activation>
+ <property>
+ <name>!maven.test.skip</name>
+ </property>
+ </activation>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ignite</groupId>
+ <artifactId>ignite-core</artifactId>
+ <scope>test</scope>
+ <type>test-jar</type>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
+
+
<build>
<resources>
<resource>
diff --git a/modules/cli/src/integrationTest/java/org/apache/ignite/cli/ITConfigCommandTest.java b/modules/cli/src/integrationTest/java/org/apache/ignite/cli/ITConfigCommandTest.java
index 7bad89e..a8e7a18 100644
--- a/modules/cli/src/integrationTest/java/org/apache/ignite/cli/ITConfigCommandTest.java
+++ b/modules/cli/src/integrationTest/java/org/apache/ignite/cli/ITConfigCommandTest.java
@@ -33,6 +33,7 @@ import org.junit.jupiter.api.TestInfo;
import org.junit.jupiter.api.io.TempDir;
import picocli.CommandLine;
+import static org.apache.ignite.internal.testframework.IgniteTestUtils.testNodeName;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
@@ -85,17 +86,6 @@ public class ITConfigCommandTest extends AbstractCliTest {
ctx.stop();
}
- /**
- * Creates a unique Ignite node name for the given test.
- */
- private static String testNodeName(TestInfo testInfo, int port) {
- return testInfo.getTestClass()
- .map(Class::getCanonicalName)
- .flatMap(clsName -> testInfo.getTestMethod().map(method -> clsName + '#' + method.getName()))
- .map(name -> name + ':' + port)
- .orElseThrow();
- }
-
@Test
public void setAndGetWithManualHost() {
int exitCode = cmd(ctx).execute(