You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/11/04 07:41:51 UTC

[GitHub] [maven-build-cache-extension] slawekjaranowski opened a new pull request, #36: Try to fix it tests

slawekjaranowski opened a new pull request, #36:
URL: https://github.com/apache/maven-build-cache-extension/pull/36

   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
    - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MNG) filed 
          for the change (usually before you start working on it).  Trivial changes like typos do not 
          require a JIRA issue.  Your pull request should address just this issue, without 
          pulling in other changes.
    - [ ] Each commit in the pull request should have a meaningful subject line and body.
    - [ ] Format the pull request title like `[MNG-XXX] - Fixes bug in ApproximateQuantiles`,
          where you replace `MNG-XXX` with the appropriate JIRA issue. Best practice
          is to use the JIRA issue title in the pull request title and in the first line of the 
          commit message.
    - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [ ] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will 
          be performed on your pull request automatically.
    - [ ] You have run the [Core IT][core-its] successfully.
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   [core-its]: https://maven.apache.org/core-its/core-it-suite/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-build-cache-extension] AlexanderAshitkin commented on a diff in pull request #36: [MBUILDCACHE-34] Improve IT test execution

Posted by GitBox <gi...@apache.org>.
AlexanderAshitkin commented on code in PR #36:
URL: https://github.com/apache/maven-build-cache-extension/pull/36#discussion_r1014328462


##########
src/test/java/org/apache/maven/buildcache/its/junit/IntegrationTestExtension.java:
##########
@@ -208,6 +208,8 @@ public Object resolveParameter( ParameterContext parameterContext,
 
             Verifier verifier = new Verifier( testExecutionDir.toString(), true );
             verifier.setLogFileName( "../log.txt" );
+            verifier.setSystemProperty( "projectVersion", System.getProperty( "projectVersion" ) );
+            verifier.setLocalRepo( System.getProperty( "localRepo" ) );

Review Comment:
   Please notice I also faced a similar problem [while adding tests](https://github.com/apache/maven-build-cache-extension/pull/36/src/test/java/org/apache/maven/buildcache/its/ForkedExecutionsTest.java). But I decided to use per-run temp directory to have clean state between runs (at least for cache).
   
   So here are the questions:
   
   - how this repository is cleaned?
   - Will it be unique between tests? Each integration test assumes clean state
   - On local workstation - will it be also clean each time? Tests to be run on local machine as well



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-build-cache-extension] slawekjaranowski merged pull request #36: [MBUILDCACHE-34] Improve IT test execution

Posted by GitBox <gi...@apache.org>.
slawekjaranowski merged PR #36:
URL: https://github.com/apache/maven-build-cache-extension/pull/36


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-build-cache-extension] AlexanderAshitkin commented on a diff in pull request #36: [MBUILDCACHE-34] Improve IT test execution

Posted by GitBox <gi...@apache.org>.
AlexanderAshitkin commented on code in PR #36:
URL: https://github.com/apache/maven-build-cache-extension/pull/36#discussion_r1014499425


##########
src/test/java/org/apache/maven/buildcache/its/junit/IntegrationTestExtension.java:
##########
@@ -208,6 +208,8 @@ public Object resolveParameter( ParameterContext parameterContext,
 
             Verifier verifier = new Verifier( testExecutionDir.toString(), true );
             verifier.setLogFileName( "../log.txt" );
+            verifier.setSystemProperty( "projectVersion", System.getProperty( "projectVersion" ) );
+            verifier.setLocalRepo( System.getProperty( "localRepo" ) );

Review Comment:
   Thanks for clarifications!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-build-cache-extension] slawekjaranowski commented on a diff in pull request #36: [MBUILDCACHE-34] Improve IT test execution

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on code in PR #36:
URL: https://github.com/apache/maven-build-cache-extension/pull/36#discussion_r1014397365


##########
src/test/java/org/apache/maven/buildcache/its/junit/IntegrationTestExtension.java:
##########
@@ -208,6 +208,8 @@ public Object resolveParameter( ParameterContext parameterContext,
 
             Verifier verifier = new Verifier( testExecutionDir.toString(), true );
             verifier.setLogFileName( "../log.txt" );
+            verifier.setSystemProperty( "projectVersion", System.getProperty( "projectVersion" ) );
+            verifier.setLocalRepo( System.getProperty( "localRepo" ) );

Review Comment:
   - `localRepo` is used to set property `maven.repo.local` which point to local Maven repository, instead of standard `.m2/repository`
   
   - `localRepo` value  is passed from pom.xml
   
   ```
   <localRepo>${project.build.directory}/local-repo</localRepo>
   ```
   
   so it is in `target` directory, it will be cleaned in standard way
   
   `localRepo` is first populated by m-invoker-p by install goal before integration test will be started, and current project arifact is instaled, next Maven process which is executed during test, download everything else was is needed
   
   before my change is m-install-p was configured to install project artifact in standard Maven local repository
   
   it is shared by all test
   
   on local workstation it will be the same
   
   https://maven.apache.org/plugins/maven-invoker-plugin/install-mojo.html



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-build-cache-extension] AlexanderAshitkin commented on a diff in pull request #36: [MBUILDCACHE-34] Improve IT test execution

Posted by GitBox <gi...@apache.org>.
AlexanderAshitkin commented on code in PR #36:
URL: https://github.com/apache/maven-build-cache-extension/pull/36#discussion_r1014326181


##########
src/test/java/org/apache/maven/buildcache/its/junit/IntegrationTestExtension.java:
##########
@@ -208,6 +208,8 @@ public Object resolveParameter( ParameterContext parameterContext,
 
             Verifier verifier = new Verifier( testExecutionDir.toString(), true );
             verifier.setLogFileName( "../log.txt" );
+            verifier.setSystemProperty( "projectVersion", System.getProperty( "projectVersion" ) );
+            verifier.setLocalRepo( System.getProperty( "localRepo" ) );

Review Comment:
   Please notice I also faced a similar problem [while adding tests](src/test/java/org/apache/maven/buildcache/its/ForkedExecutionsTest.java). But I decided to use per-run temp directory to have clean state between runs (at least for cache). 
   
   So here are the questions:
   1. how this repository is cleaned?
   2. Will it be unique between tests? Each integration test assumes clean state
   3. On local workstation - will it be also clean each time? Tests to be run on local machine as well



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-build-cache-extension] AlexanderAshitkin commented on a diff in pull request #36: [MBUILDCACHE-34] Improve IT test execution

Posted by GitBox <gi...@apache.org>.
AlexanderAshitkin commented on code in PR #36:
URL: https://github.com/apache/maven-build-cache-extension/pull/36#discussion_r1014326181


##########
src/test/java/org/apache/maven/buildcache/its/junit/IntegrationTestExtension.java:
##########
@@ -208,6 +208,8 @@ public Object resolveParameter( ParameterContext parameterContext,
 
             Verifier verifier = new Verifier( testExecutionDir.toString(), true );
             verifier.setLogFileName( "../log.txt" );
+            verifier.setSystemProperty( "projectVersion", System.getProperty( "projectVersion" ) );
+            verifier.setLocalRepo( System.getProperty( "localRepo" ) );

Review Comment:
   Please notice I also faced a similar problem [while adding tests](src/test/java/org/apache/maven/buildcache/its/ForkedExecutionsTest.java). But I decided to use per-run temp directory to have clean state between runs (at least for cache). 
   
   So here are the questions:
   1. how this repository is cleaned?
   2. Will it be unique between tests? Each integration test assumes clean state



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-build-cache-extension] AlexanderAshitkin commented on a diff in pull request #36: [MBUILDCACHE-34] Improve IT test execution

Posted by GitBox <gi...@apache.org>.
AlexanderAshitkin commented on code in PR #36:
URL: https://github.com/apache/maven-build-cache-extension/pull/36#discussion_r1014326181


##########
src/test/java/org/apache/maven/buildcache/its/junit/IntegrationTestExtension.java:
##########
@@ -208,6 +208,8 @@ public Object resolveParameter( ParameterContext parameterContext,
 
             Verifier verifier = new Verifier( testExecutionDir.toString(), true );
             verifier.setLogFileName( "../log.txt" );
+            verifier.setSystemProperty( "projectVersion", System.getProperty( "projectVersion" ) );
+            verifier.setLocalRepo( System.getProperty( "localRepo" ) );

Review Comment:
   Please notice I also faced a similar problem [while adding tests](src/test/java/org/apache/maven/buildcache/its/ForkedExecutionsTest.java). But I decided to use temp directory this way to have clean state between runs at least for cache. 
   
   So here the questions:
   1. how this repository is cleaned?
   2. Will it be unique between tests? Each integration test assumes clean state



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven-build-cache-extension] AlexanderAshitkin commented on a diff in pull request #36: [MBUILDCACHE-34] Improve IT test execution

Posted by GitBox <gi...@apache.org>.
AlexanderAshitkin commented on code in PR #36:
URL: https://github.com/apache/maven-build-cache-extension/pull/36#discussion_r1014326581


##########
src/test/projects/build-extension/pom.xml:
##########
@@ -34,9 +34,9 @@
             <extension>
                 <groupId>org.apache.maven.extensions</groupId>
                 <artifactId>maven-build-cache-extension</artifactId>
-                <version>1.0.0-SNAPSHOT</version>
+                <version>${projectVersion}</version>

Review Comment:
   👍 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org