is currently readonly. We are migrating to, please continue working there on Monday 14/12. See:

Commit ffc402f6 authored by Ard Schrijvers's avatar Ard Schrijvers

REPO-2180 [Backport 12.6] Do not reuse credentials object in different repository

You can only login multiple times with the exact same credentials instance
to a single repository, not to multiple ones

(cherry picked from commit d40edad9)
parent a155b999
* Copyright 2014-2016 Hippo B.V. (
* Copyright 2014-2019 Hippo B.V. (
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -76,8 +76,6 @@ public abstract class ClusterTest {
private static final String repo1Config = "/org/onehippo/repository/clustering/node1-repository-" + dbtype + ".xml";
private static final String repo2Config = "/org/onehippo/repository/clustering/node2-repository-" + dbtype + ".xml";
protected static final Credentials CREDENTIALS = new SimpleCredentials("admin", "admin".toCharArray());
private static File tmpdir;
private static String repo1Path;
private static String repo2Path;
......@@ -337,7 +335,8 @@ public abstract class ClusterTest {
protected Session loginSession(Object repo) {
try {
return (Session) repo.getClass().getMethod("login", Credentials.class).invoke(repo, CREDENTIALS);
return (Session) repo.getClass().getMethod("login", Credentials.class).invoke(repo,
new SimpleCredentials("admin", "admin".toCharArray()));
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
log.error("Failed to log in session: " + e);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment