You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Steinar Bang <sb...@dod.no> on 2022/09/19 19:02:59 UTC

pax exam test works locally but fails on github actions

This integration test works locally but fails on github actions:
 https://github.com/steinarb/sampleapp/tree/master/sampleapp.tests

The error message is:
 https://gist.github.com/steinarb/98cc1dda6e53472504dce9f49eebe03c

Anyone have an idea why this is?

Is it because I'm actually loading a different feature repository than
the one built locally when I'm building locally?

Is there a problem with the ~/.m2/repository/ in the github action
build?

Do I somehow need to specify the feature version when loading the
feature? Ie. is the "/0" in the error message significant?

Here's the full maven build log of the failed github action:
 https://github.com/steinarb/sampleapp/actions/runs/3084454121

Thanks!


- Steinar


Re: pax exam test works locally but fails on github actions

Posted by Steinar Bang <sb...@dod.no>.
>>>>> Steinar Bang <sb...@dod.no>:

> This integration test works locally but fails on github actions:
>  https://github.com/steinarb/sampleapp/tree/master/sampleapp.tests

> The error message is:
>  https://gist.github.com/steinarb/98cc1dda6e53472504dce9f49eebe03c

> Anyone have an idea why this is?

I figured it out.

The github actions file I added used "mvn package".

When I tried locally with
 rm -rf ~/.m2/repository/no/priv/bang/sampleapp/
 mvn package

it failed with the same error message as the github actions build. 

But this built fine, includign the pax exam test:
 rm -rf ~/.m2/repository/no/priv/bang/sampleapp/
 mvn install

So I changed the git hub actions workflow file to use "mvn install"
 https://github.com/steinarb/sampleapp/commit/b6ea4d2edf25d4a1213068900529422b8d10406a

and then the github actions build went green
 https://github.com/steinarb/sampleapp/actions/runs/3099564326

So... next out will be to get coveralls and sonarcloud working again,
and I can put back the badges that haven't updated since travis-ci.org
went away (I could never get the free tier travis-ci.com stuff to work):
 https://en.wikipedia.org/wiki/Travis_CI#Company


Re: pax exam test works locally but fails on github actions

Posted by Steinar Bang <sb...@dod.no>.
>>>>> Steinar Bang <sb...@dod.no>:

> Do I somehow need to specify the feature version when loading the
> feature? Ie. is the "/0" in the error message significant?

I tried specifying the version explicit, ie
    @Test
    public void testLoadFeature() throws Exception { // NOSONAR this test has an assert, just not an assert sonar recognizes
        installAndAssertFeature("sampleapp-with-derby/1.0.0-SNAPSHOT");
    }

But that failed as well:
 https://github.com/steinarb/sampleapp/actions/runs/3085501564

This time with the following error message:
 SampleappIntegrationTest: testLoadFeature
 java.lang.IllegalArgumentException: No matching features for sampleapp-with-derby/[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]