From 98a8c718e8ac11d2a19a707bb2ca966b91cfaa05 Mon Sep 17 00:00:00 2001 From: Nugusbayev Kanagat Date: Fri, 1 Dec 2023 01:03:24 +0600 Subject: [PATCH 1/5] updated message that helps run properly ConfigurationExporterTest on windows --- .../apm/agent/configuration/ConfigurationExporterTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java index 22e8534486..97bc8d4bcb 100644 --- a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java +++ b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java @@ -120,7 +120,8 @@ void testGeneratedConfigurationDocsAreUpToDate() throws IOException, TemplateExc assertThat(renderedDocumentation) .withFailMessage("The rendered configuration documentation (/docs/configuration.asciidoc) is not up-to-date.\n" + "If you see this error on CI, it means you have to execute the tests locally " + - "(./mvnw -Dsurefire.failIfNoTests=false -Dtest=ConfigurationExporterTest -pl apm-agent -am clean test) " + + "(./mvnw -Dsurefire.failIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false -Dtest=ConfigurationExporterTest -pl apm-agent-builds/apm-agent -am clean test) " + + "or on Windows(./mvnw '-Dsurefire.failIfNoTests=false' '-Dsurefire.failIfNoSpecifiedTests=false' -Dtest=ConfigurationExporterTest -pl apm-agent-builds/apm-agent -am clean test) " + "which will update the rendered docs.\n" + "If you see this error while running the tests locally, there's nothing more to do - the rendered docs have been updated " + "and the following test execution should not have failed.") From 7967f35f24a90092252c2df9d381046588d9eacd Mon Sep 17 00:00:00 2001 From: Nugusbayev Kanagat Date: Fri, 1 Dec 2023 01:08:16 +0600 Subject: [PATCH 2/5] restored previous command for macos, linux --- .../apm/agent/configuration/ConfigurationExporterTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java index 97bc8d4bcb..0de49f85cd 100644 --- a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java +++ b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java @@ -120,7 +120,7 @@ void testGeneratedConfigurationDocsAreUpToDate() throws IOException, TemplateExc assertThat(renderedDocumentation) .withFailMessage("The rendered configuration documentation (/docs/configuration.asciidoc) is not up-to-date.\n" + "If you see this error on CI, it means you have to execute the tests locally " + - "(./mvnw -Dsurefire.failIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false -Dtest=ConfigurationExporterTest -pl apm-agent-builds/apm-agent -am clean test) " + + "(./mvnw -Dsurefire.failIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false -Dtest=ConfigurationExporterTest -pl apm-agent -am clean test) " + "or on Windows(./mvnw '-Dsurefire.failIfNoTests=false' '-Dsurefire.failIfNoSpecifiedTests=false' -Dtest=ConfigurationExporterTest -pl apm-agent-builds/apm-agent -am clean test) " + "which will update the rendered docs.\n" + "If you see this error while running the tests locally, there's nothing more to do - the rendered docs have been updated " + From 588922b9a8713ea77d128b2ea1b72ebedf0415d7 Mon Sep 17 00:00:00 2001 From: Nugusbayev Kanagat Date: Fri, 1 Dec 2023 01:40:06 +0600 Subject: [PATCH 3/5] updated contributing.md --- CONTRIBUTING.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8707aee2de..7b3eb809be 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -265,8 +265,9 @@ See [`apm-agent-plugins/README.md`](apm-agent-plugins/README.md) HTML Documentation is generated from text files stored in `docs` folder using [AsciiDoc](http://asciidoc.org/) format. The `configuration.asciidoc` file is generated from running `co.elastic.apm.agent.configuration.ConfigurationExporter` -(e.g. via `./mvnw -Dsurefire.failIfNoTests=false -Dtest=ConfigurationExporterTest -pl apm-agent -am clean test`). All the other asciidoc text files -are written manually. +(e.g. via `./mvnw -Dsurefire.failIfNoTests=false -Dtest=ConfigurationExporterTest -pl apm-agent -am clean test` +or on Windows `./mvnw '-Dsurefire.failIfNoTests=false' '-Dsurefire.failIfNoSpecifiedTests=false' -Dtest=ConfigurationExporterTest -pl apm-agent-builds/apm-agent -am clean test`). +All the other asciidoc text files are written manually. A preview of the documentation is generated for each pull-request. Click on the build `Details` of the `elasticsearch-ci/docs` job and go to the bottom of the `Console Output` to see the link. From 646973458af8db185b4fa27afe41700d8c19a2f1 Mon Sep 17 00:00:00 2001 From: Nugusbayev Kanagat Date: Mon, 4 Dec 2023 19:00:51 +0600 Subject: [PATCH 4/5] applied suggests --- CONTRIBUTING.md | 2 +- .../apm/agent/configuration/ConfigurationExporterTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7b3eb809be..6496622a31 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -266,7 +266,7 @@ See [`apm-agent-plugins/README.md`](apm-agent-plugins/README.md) HTML Documentation is generated from text files stored in `docs` folder using [AsciiDoc](http://asciidoc.org/) format. The `configuration.asciidoc` file is generated from running `co.elastic.apm.agent.configuration.ConfigurationExporter` (e.g. via `./mvnw -Dsurefire.failIfNoTests=false -Dtest=ConfigurationExporterTest -pl apm-agent -am clean test` -or on Windows `./mvnw '-Dsurefire.failIfNoTests=false' '-Dsurefire.failIfNoSpecifiedTests=false' -Dtest=ConfigurationExporterTest -pl apm-agent-builds/apm-agent -am clean test`). +or on Windows `.\mvnw '-Dsurefire.failIfNoTests=false' '-Dsurefire.failIfNoSpecifiedTests=false' -Dtest=ConfigurationExporterTest -pl apm-agent-builds/apm-agent -am clean test`). All the other asciidoc text files are written manually. A preview of the documentation is generated for each pull-request. diff --git a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java index 0de49f85cd..4f37e14085 100644 --- a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java +++ b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java @@ -121,7 +121,7 @@ void testGeneratedConfigurationDocsAreUpToDate() throws IOException, TemplateExc .withFailMessage("The rendered configuration documentation (/docs/configuration.asciidoc) is not up-to-date.\n" + "If you see this error on CI, it means you have to execute the tests locally " + "(./mvnw -Dsurefire.failIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false -Dtest=ConfigurationExporterTest -pl apm-agent -am clean test) " + - "or on Windows(./mvnw '-Dsurefire.failIfNoTests=false' '-Dsurefire.failIfNoSpecifiedTests=false' -Dtest=ConfigurationExporterTest -pl apm-agent-builds/apm-agent -am clean test) " + + "or on Windows(.\\mvnw '-Dsurefire.failIfNoTests=false' '-Dsurefire.failIfNoSpecifiedTests=false' -Dtest=ConfigurationExporterTest -pl apm-agent-builds/apm-agent -am clean test) " + "which will update the rendered docs.\n" + "If you see this error while running the tests locally, there's nothing more to do - the rendered docs have been updated " + "and the following test execution should not have failed.") From 5eb3c310546ca97488703c464e250169fe4f3788 Mon Sep 17 00:00:00 2001 From: Nugusbayev Kanagat Date: Tue, 5 Dec 2023 20:27:13 +0600 Subject: [PATCH 5/5] replaced single quotes with double quotes. added escaped char --- CONTRIBUTING.md | 2 +- .../apm/agent/configuration/ConfigurationExporterTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6496622a31..480fb99a67 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -266,7 +266,7 @@ See [`apm-agent-plugins/README.md`](apm-agent-plugins/README.md) HTML Documentation is generated from text files stored in `docs` folder using [AsciiDoc](http://asciidoc.org/) format. The `configuration.asciidoc` file is generated from running `co.elastic.apm.agent.configuration.ConfigurationExporter` (e.g. via `./mvnw -Dsurefire.failIfNoTests=false -Dtest=ConfigurationExporterTest -pl apm-agent -am clean test` -or on Windows `.\mvnw '-Dsurefire.failIfNoTests=false' '-Dsurefire.failIfNoSpecifiedTests=false' -Dtest=ConfigurationExporterTest -pl apm-agent-builds/apm-agent -am clean test`). +or on Windows `.\mvnw "-Dsurefire.failIfNoTests=false" "-Dsurefire.failIfNoSpecifiedTests=false" -Dtest=ConfigurationExporterTest -pl apm-agent-builds/apm-agent -am clean test`). All the other asciidoc text files are written manually. A preview of the documentation is generated for each pull-request. diff --git a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java index 4f37e14085..162fd1155d 100644 --- a/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java +++ b/apm-agent-builds/apm-agent/src/test/java/co/elastic/apm/agent/configuration/ConfigurationExporterTest.java @@ -121,7 +121,7 @@ void testGeneratedConfigurationDocsAreUpToDate() throws IOException, TemplateExc .withFailMessage("The rendered configuration documentation (/docs/configuration.asciidoc) is not up-to-date.\n" + "If you see this error on CI, it means you have to execute the tests locally " + "(./mvnw -Dsurefire.failIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false -Dtest=ConfigurationExporterTest -pl apm-agent -am clean test) " + - "or on Windows(.\\mvnw '-Dsurefire.failIfNoTests=false' '-Dsurefire.failIfNoSpecifiedTests=false' -Dtest=ConfigurationExporterTest -pl apm-agent-builds/apm-agent -am clean test) " + + "or on Windows(.\\mvnw \"-Dsurefire.failIfNoTests=false\" \"-Dsurefire.failIfNoSpecifiedTests=false\" -Dtest=ConfigurationExporterTest -pl apm-agent-builds/apm-agent -am clean test) " + "which will update the rendered docs.\n" + "If you see this error while running the tests locally, there's nothing more to do - the rendered docs have been updated " + "and the following test execution should not have failed.")