'Maven failsafe plugin with system property executing the integration test twice

with the below config:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-failsafe-plugin</artifactId>
    <version>2.18</version>
    <executions>
      <execution>
        <id>integration-tests</id>
        <goals>
          <goal>integration-test</goal>
          <goal>verify</goal>
        </goals>
        <configuration>
          <systemPropertyVariables>
            <environment>${env}</environment>
          </systemPropertyVariables>
          <skipTests>${skip.integration.tests}</skipTests>             
        </configuration>
      </execution>
    </executions>
  </plugin>
</plugins>

When I execute the command mvn verify -Denv=http://localhost:8080 integration tests are getting executed twice, one with env value =null resulting in failure of test and other with the desired env value. So it is executing the test twice with different results



Solution 1:[1]

I had the same issue.

My maven logs:

[INFO] --- maven-failsafe-plugin:2.22.0:integration-test (integration-tests) @ core ---
[...tests...]
[INFO] --- maven-failsafe-plugin:2.22.0:integration-test (default) @ core ---
[...tests...]

Integration tests run twice when we specify id for execution. So then we have default inherit execution which runs tests and second one - our custom execution.

I resolved it by removing id element from configuration.

So in your case remove <id>integration-tests</id> line.

Solution 2:[2]

As wikipedia.org is signed by LetsEncrypt, and one of its CA certificates is expired: https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/

You need to remove the old DST root CA from your certificate store and add the ISRG root CA to your certificate store.

For Centos/Redhat, you can check your current CA in /etc/pki/tls/certs/ca-bundle.crt, for Debian/Ubuntu, you can check your current CA with command: sudo dpkg-reconfigure ca-certificates

Solution 3:[3]

I use Jupyter Notebook on Anaconda navigator.

enter image description here

I opened a new terminal to reinstall wptools on Anaconda environment

wptools on github

$ pip install wptools

then it worked fine !

Solution 4:[4]

The issue

Kindly provide the error message you encountered trying to download wptools on your Windows 10.

I had a similar issue with the Udacity workspace. I later found out that the issue is currently as of 14th June 2022, a technical issue on audacity, I learnt it had been reported and the technical team has been informed.

What I did

  1. I downloaded the notebook from the Udacity workspace
  2. I uploaded the downloaded .ipynb file and opened it on my local machine (Windows).
  3. I got an error also, but the error was because wptools is not pre-installed on Anaconda. So to do this I had to install it directly using pip as it is here.

on the first cell of your notebook, you can just use pip install wptools 4. With that installed you can remove the code pip install wptools so you won't have to reinstall anytime you run that cell.

That was how I did mine, and it worked fine on my Windows 10.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 fullstack20148
Solution 2 LingYan Meng
Solution 3 Dharman
Solution 4 Adegite Taiwo