You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/07/27 14:05:04 UTC
[jira] [Commented] (SLING-3873) Using SlingTestBase does not work
with a non-standard password set on the sling server
[ https://issues.apache.org/jira/browse/SLING-3873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14642628#comment-14642628 ]
ASF GitHub Bot commented on SLING-3873:
---------------------------------------
GitHub user wimsymons opened a pull request:
https://github.com/apache/sling/pull/99
Fixed SLING-3873
This fixes the problem with a non-default admin password on a remote AEM instance.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/wimsymons/sling trunk
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/sling/pull/99.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #99
----
commit 396229bf97dac1a4a287ddd763476763382622ca
Author: Wim Symons <wi...@gmail.com>
Date: 2015-07-27T12:02:54Z
Fixed SLING-3873
----
> Using SlingTestBase does not work with a non-standard password set on the sling server
> --------------------------------------------------------------------------------------
>
> Key: SLING-3873
> URL: https://issues.apache.org/jira/browse/SLING-3873
> Project: Sling
> Issue Type: Bug
> Components: Testing
> Affects Versions: org.apache.sling.testing.tools 1.0.6
> Reporter: Kapil V Ahuja
> Assignee: Dan Klco
> Priority: Critical
>
> I was using SlingTestBase class and was trying to run the tests against a hosted CQ server. I am not using a standard "Admin/admin" username/password and the base class was not initializing. Upon debugging the code, i noticed the following potential bug (unless you can tell me how to override this).
> {code:title="WebConcoleClient.java"}
> public void checkBundleInstalled(String symbolicName, int timeoutSeconds) {
> final String path = getBundlePath(symbolicName, ".json");
> new RetryingContentChecker(executor, builder).check(path, 200, timeoutSeconds, 500);
> }
> {code}
> Note that this class is calling the RetryingContentChecker without a username and password. This calls the constructor as follows
> {code:title="RetryingContentChecker.java"}
> public RetryingContentChecker(RequestExecutor executor, RequestBuilder builder) {
> this(executor, builder, null, SlingTestBase.ADMIN);
> }
> public RetryingContentChecker(RequestExecutor executor, RequestBuilder builder, String username, String password) {
> this.executor = executor;
> this.builder = builder;
> if (username != null) {
> this.username = username;
> } else {
> this.username = SlingTestBase.ADMIN;
> }
> if (password != null) {
> this.password = password;
> } else {
> this.password = SlingTestBase.ADMIN;
> }
> }
> {code}
> I you read the logic, even though I have passed my password in system properties, the default password "Admin" gets set and the connection to my hosted server doesnt work and this fails for me.
> I really need this to be fixed and may try to provide a patch, but i need to know if i invest the time to setup the development environment on my local machine - checkout, compile, pass test cases, understand how the lifecycle works for you, how soon can a patch build be released to maven repository so that i can use that JAR. If that's not going to happen soon, i will just override classes locally for now.
> thanks
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)