Expand my Community achievements bar.

SOLVED

AEM as a cloud service - production build fails in step custom functional testing - PublishPageValidationIT

Avatar

Community Advisor

Hi community, production build fails in the last step, custom functional testing, in com.xxxxxx.it.tests.PublishPageValidationIT

the publish url is pointing to localhost:4503 which is the same problem described here https://github.com/adobe/aem-project-archetype/issues/794

 

i created a new vhosts file and set serveralias per instructions but issue persists, how/where do i change the publish url so it is not pointing to localhost but to the actual publish url?

 

here´s a log excerpt, removed identifiers

 

[main] INFO org.apache.sling.testing.junit.rules.instance.ExistingInstanceStatement - InstanceConfiguration (URL: https://author-pxxxxxx-xxxxx.adobeaemcloud.net, runmode: author) found for test com.xxxxxxxx.it.tests.PublishPageValidationIT
[main] INFO org.apache.sling.testing.junit.rules.instance.ExistingInstanceStatement - Using default InstanceConfiguration provided (URL: http://localhost:4503, runmode: publish) for test com.xxxxxx.it.tests.PublishPageValidationIT
[main] INFO com.xxxxxx.it.tests.PublishPageValidationIT - Using http://localhost:4503/ as baseURL
2022/02/17 16:43:36:246 GMT [DEBUG] MainClientExec - Opening connection {}->http://localhost:4503
2022/02/17 16:43:36:261 GMT [DEBUG] MainClientExec - Connection discarded
2022/02/17 16:43:36:334 GMT [DEBUG] MainClientExec - Opening connection {}->http://localhost:4503
2022/02/17 16:43:36:335 GMT [DEBUG] MainClientExec - Connection discarded
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.506 s <<< FAILURE! - in com.xxxxxx.it.tests.PublishPageValidationIT
[ERROR] validateHomepage(com.xxxxxxx.it.tests.PublishPageValidationIT) Time elapsed: 0.203 s <<< ERROR!
org.apache.http.conn.HttpHostConnectException: Connect to localhost:4503 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:156)

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

hi, i actually put an @ignore in the PublishPageValidationIT module for now to get the pipeline to finish successfully, waiting for feedback from support as well, thanks for your reply!

View solution in original post

5 Replies

Avatar

Community Advisor

Hi @Sebastiane_Edberg_ 

 

Please raise a request with Adobe Support. This seems to be an issue with Product and needs to be fixed by product team.

 

Thanks!

Avatar

Correct answer by
Community Advisor

hi, i actually put an @ignore in the PublishPageValidationIT module for now to get the pipeline to finish successfully, waiting for feedback from support as well, thanks for your reply!

Avatar

Employee Advisor

The problem is that "localhost:4503" is picked as remote side, which is wrong. On the other hand side I see it picked up properly for author:

 

[main] INFO org.apache.sling.testing.junit.rules.instance.ExistingInstanceStatement - InstanceConfiguration (URL: https://author-pxxxxxx-xxxxx.adobeaemcloud.net, runmode: author) found for test com.xxxxxxxx.it.tests.PublishPageValidationIT
[main] INFO org.apache.sling.testing.junit.rules.instance.ExistingInstanceStatement - Using default InstanceConfiguration provided (URL: http://localhost:4503, runmode: publish) for test com.xxxxxx.it.tests.PublishPageValidationIT

Unless you heavily customize the it.test pom.xml file (and that should never be necessary), this can/should not happen.

Avatar

Community Advisor

@Jörg_Hoh thanks for your reply, we have made minimal configuration to the instance, i had a look in the it.test pom xml and it looks like this for local id which is ok i guess:

 

<id>local</id>
            <properties>
                <!-- Cloud author service (LB) -->
                <it.author.url>http://localhost:4502</it.author.url>
                <it.author.user>admin</it.author.user>
                <it.author.password>admin</it.author.password>

                <!-- cloud publish service (LB) -->
                <it.publish.url>http://localhost:4503</it.publish.url>
                <it.publish.user>admin</it.publish.user>
                <it.publish.password>admin</it.publish.password>
            </properties>

 

further down in that file we have:

 

<plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.21.0</version>
                        <configuration>
                            <testSourceDirectory>${basedir}/src/main/java/</testSourceDirectory>
                            <testClassesDirectory>${project.build.directory}/classes/</testClassesDirectory>
                            <systemPropertyVariables>
                                <!-- Same properties as used when run in a AEM CI/CD pipeline -->
                                <sling.it.configure.default.replication.agents>false</sling.it.configure.default.replication.agents>
                                <com.sun.security.enableAIAcaIssuers>true</com.sun.security.enableAIAcaIssuers>
                                <it.logintokenauth>true</it.logintokenauth>

                                <!-- Sling Testing Tools properties for configuring the test instances -->
                                <sling.it.instances>2</sling.it.instances>

                                <!-- Author service -->
                                <sling.it.instance.url.1>${it.author.url}</sling.it.instance.url.1>
                                <sling.it.instance.runmode.1>author</sling.it.instance.runmode.1>
                                <sling.it.instance.adminUser.1>${it.author.user}</sling.it.instance.adminUser.1>
                                <sling.it.instance.adminPassword.1>${it.author.password}
                                </sling.it.instance.adminPassword.1>

                                <!-- Publish service -->
                                <sling.it.instance.url.2>${it.publish.url}</sling.it.instance.url.2>
                                <sling.it.instance.runmode.2>publish</sling.it.instance.runmode.2>
                                <sling.it.instance.adminUser.2>${it.publish.user}</sling.it.instance.adminUser.2>
                                <sling.it.instance.adminPassword.2>${it.publish.password}
                                </sling.it.instance.adminPassword.2>
                            </systemPropertyVariables>
                        </configuration>

Avatar

Level 1

Increment the version of ‘aem-cloud-testing-clients’ dependency to ‘1.1.12’. This should fix the issue of functional test failure.