code.onehippo.org is currently readonly. We are migrating to code.bloomreach.com, please continue working there on Monday 14/12. See: https://docs.bloomreach.com/display/engineering/GitLab

Commit 0bf87cb5 authored by Ard Schrijvers's avatar Ard Schrijvers

REPO-1811 improve feedback

parent 7027fce3
......@@ -117,12 +117,15 @@ public abstract class AbstractLockManagerTest extends RepositoryTestCase {
selectStatement.setString(1, key);
ResultSet resultSet = selectStatement.executeQuery();
if (resultSet.next()) {
assertEquals(expectedStatus, resultSet.getString("status"));
String status = resultSet.getString("status");
assertEquals(String.format("Unexpected status '%s' found", status), expectedStatus, status);
if (lockOwnerExpectation != null) {
assertEquals(lockOwnerExpectation, resultSet.getString("lockOwner"));
String lockOwner = resultSet.getString("lockOwner");
assertEquals(String.format("Unexpected lockOwner '%s' found", lockOwner), lockOwnerExpectation, lockOwner);
}
if (lockThreadExpectation != null) {
assertEquals(lockThreadExpectation, resultSet.getString("lockThread"));
String lockThread = resultSet.getString("lockThread");
assertEquals(String.format("Unexpected lockThread '%s' found", lockThread), lockThreadExpectation, lockThread);
}
} else {
fail(String.format("A row with lockKey '%s' should exist", key));
......
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