This is an automated email from the ASF dual-hosted git repository. sergeychugunov pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push: new c9eee1e045b IGNITE-18135 Test was rewritten to use tmp folders instead of build-specific 'target' folder - Fixes #10377. c9eee1e045b is described below commit c9eee1e045b67b3c60698548428a54604d24be05 Author: Sergey Chugunov <sergey.chugu...@gmail.com> AuthorDate: Wed Nov 16 17:08:46 2022 +0300 IGNITE-18135 Test was rewritten to use tmp folders instead of build-specific 'target' folder - Fixes #10377. Signed-off-by: Sergey Chugunov <sergey.chugu...@gmail.com> --- .../ignite/util/GridCommandHandlerMetadataTest.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerMetadataTest.java b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerMetadataTest.java index 93f36e49a8a..50fcb5df7b8 100644 --- a/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerMetadataTest.java +++ b/modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerMetadataTest.java @@ -259,24 +259,29 @@ public class GridCommandHandlerMetadataTest extends GridCommandHandlerClusterByC * - checks error code and command output. */ @Test - public void testInvalidArguments() { + public void testInvalidArguments() throws Exception { String out; + String inDirName = Files.createTempDirectory(getClass().getSimpleName() + + " _inDir_" + UUID.randomUUID()).toFile().getAbsolutePath(); + String outDirName = Files.createTempDirectory(getClass().getSimpleName() + + " _outDir_" + UUID.randomUUID()).toFile().getAbsolutePath(); + assertEquals(EXIT_CODE_INVALID_ARGUMENTS, execute("--meta", "remove")); out = testOut.toString(); assertContains(log, out, "Check arguments."); assertContains(log, out, "Type to remove is not specified"); assertContains(log, out, "Please add one of the options: --typeName <type_name> or --typeId <type_id>"); - assertEquals(EXIT_CODE_INVALID_ARGUMENTS, execute("--meta", "remove", "--typeId", "0", "--out", "target")); + assertEquals(EXIT_CODE_INVALID_ARGUMENTS, execute("--meta", "remove", "--typeId", "0", "--out", outDirName)); out = testOut.toString(); assertContains(log, out, "Check arguments."); - assertContains(log, out, "Cannot write to output file target."); + assertContains(log, out, "Cannot write to output file " + outDirName); - assertEquals(EXIT_CODE_INVALID_ARGUMENTS, execute("--meta", "update", "--in", "target")); + assertEquals(EXIT_CODE_INVALID_ARGUMENTS, execute("--meta", "update", "--in", inDirName)); out = testOut.toString(); assertContains(log, out, "Check arguments."); - assertContains(log, out, "Cannot read metadata from target"); + assertContains(log, out, "Cannot read metadata from " + inDirName); } /**