[
https://issues.apache.org/jira/browse/SLING-3873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kapil V Ahuja updated SLING-3873:
---------------------------------
Description:
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
was:
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
> 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
> 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.2#6252)