[Minor] Fixing broken tests

This commit is contained in:
Robert von Burg 2017-05-22 14:56:45 +02:00
parent 22b326de80
commit c67025761f
4 changed files with 4 additions and 8 deletions

View File

@ -18,7 +18,7 @@ public abstract class PerformanceTest {
@Test
public void runPerformanceTestCached() {
Certificate certificate = runtime().getPrivilegeHandler().authenticate("cached", "test".toCharArray());
Certificate certificate = runtime().getPrivilegeHandler().authenticate("cached", "cached".toCharArray());
ServiceHandler svcHandler = runtime().getServiceHandler();
svcHandler.doService(certificate, new PerformanceTestService(), argInstance());
@ -27,7 +27,7 @@ public abstract class PerformanceTest {
@Test
public void runPerformanceTestTransactional() {
Certificate certificate = runtime().getPrivilegeHandler().authenticate("transactional", "test".toCharArray());
Certificate certificate = runtime().getPrivilegeHandler().authenticate("transactional", "transactional".toCharArray());
ServiceHandler svcHandler = runtime().getServiceHandler();
svcHandler.doService(certificate, new PerformanceTestService(), argInstance());

View File

@ -50,7 +50,7 @@ public class PerformanceTransientTest {
@Test
public void runPerformanceTest() {
Certificate certificate = runtimeMock.getPrivilegeHandler().authenticate("transient", "test".toCharArray());
Certificate certificate = runtimeMock.getPrivilegeHandler().authenticate("transient", "transient".toCharArray());
ServiceHandler svcHandler = runtimeMock.getServiceHandler();
svcHandler.doService(certificate, new PerformanceTestService(), new PerformanceTestArgument());

View File

@ -75,7 +75,7 @@ public class DefaultEncryptionHandler implements EncryptionHandler {
@Override
public String nextToken() {
byte[] bytes = new byte[16];
byte[] bytes = new byte[32];
this.secureRandom.nextBytes(bytes);
return StringHelper.getHexString(bytes);
}

View File

@ -1286,10 +1286,6 @@ public class DefaultPrivilegeHandler implements PrivilegeHandler {
// we only work with hashed passwords
byte[] passwordHash = this.encryptionHandler.hashPassword(password, salt);
logger.info("New hash: " + StringHelper.getHexString(passwordHash));
logger.info("User hash: " + StringHelper.getHexString(pwHash));
logger.info("User salt: " + StringHelper.getHexString(salt));
// validate password
if (!Arrays.equals(passwordHash, pwHash))
throw new InvalidCredentialsException(MessageFormat.format("Password is incorrect for {0}", username)); //$NON-NLS-1$