Fix typos
This commit is contained in:
parent
c560b9229c
commit
93d06e3f4d
|
@ -141,7 +141,7 @@ class SenderTest {
|
||||||
CompletableFuture<Result> future = sender.send(Message.newBuilder().withDestination("1").build());
|
CompletableFuture<Result> future = sender.send(Message.newBuilder().withDestination("1").build());
|
||||||
|
|
||||||
// up to three failures can happen, with 100ms exponential backoff
|
// up to three failures can happen, with 100ms exponential backoff
|
||||||
// if we end up using the fourth, and finaly try, it would be after ~700 ms
|
// if we end up using the fourth, and finally try, it would be after ~700 ms
|
||||||
CompletableFuture.delayedExecutor(300, TimeUnit.MILLISECONDS).execute(() ->
|
CompletableFuture.delayedExecutor(300, TimeUnit.MILLISECONDS).execute(() ->
|
||||||
wireMock.stubFor(any(anyUrl())
|
wireMock.stubFor(any(anyUrl())
|
||||||
.willReturn(aResponse()
|
.willReturn(aResponse()
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class MessagesDynamoDb extends AbstractDynamoDbStore {
|
||||||
|
|
||||||
private void storeBatch(final List<MessageProtos.Envelope> messages, final UUID destinationAccountUuid, final long destinationDeviceId) {
|
private void storeBatch(final List<MessageProtos.Envelope> messages, final UUID destinationAccountUuid, final long destinationDeviceId) {
|
||||||
if (messages.size() > DYNAMO_DB_MAX_BATCH_SIZE) {
|
if (messages.size() > DYNAMO_DB_MAX_BATCH_SIZE) {
|
||||||
throw new IllegalArgumentException("Maximum batch size of " + DYNAMO_DB_MAX_BATCH_SIZE + " execeeded with " + messages.size() + " messages");
|
throw new IllegalArgumentException("Maximum batch size of " + DYNAMO_DB_MAX_BATCH_SIZE + " exceeded with " + messages.size() + " messages");
|
||||||
}
|
}
|
||||||
|
|
||||||
final AttributeValue partitionKey = convertPartitionKey(destinationAccountUuid);
|
final AttributeValue partitionKey = convertPartitionKey(destinationAccountUuid);
|
||||||
|
|
|
@ -233,7 +233,7 @@ class AccountsManagerConcurrentModificationIntegrationTest {
|
||||||
return JsonHelpers.fromJson(redisSetArgumentCapture.getValue(), Account.class);
|
return JsonHelpers.fromJson(redisSetArgumentCapture.getValue(), Account.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void verifyAccount(final String name, final Account account, final boolean discoverableByPhoneNumber, final String currentProfileVersion, final String identityKey, final byte[] unidentifiedAccessKey, final String pin, final String clientRegistrationLock, final boolean unrestrictedUnidentifiedAcces, final long lastSeen) {
|
private void verifyAccount(final String name, final Account account, final boolean discoverableByPhoneNumber, final String currentProfileVersion, final String identityKey, final byte[] unidentifiedAccessKey, final String pin, final String clientRegistrationLock, final boolean unrestrictedUnidentifiedAccess, final long lastSeen) {
|
||||||
|
|
||||||
assertAll(name,
|
assertAll(name,
|
||||||
() -> assertEquals(discoverableByPhoneNumber, account.isDiscoverableByPhoneNumber()),
|
() -> assertEquals(discoverableByPhoneNumber, account.isDiscoverableByPhoneNumber()),
|
||||||
|
@ -241,7 +241,7 @@ class AccountsManagerConcurrentModificationIntegrationTest {
|
||||||
() -> assertEquals(identityKey, account.getIdentityKey()),
|
() -> assertEquals(identityKey, account.getIdentityKey()),
|
||||||
() -> assertArrayEquals(unidentifiedAccessKey, account.getUnidentifiedAccessKey().orElseThrow()),
|
() -> assertArrayEquals(unidentifiedAccessKey, account.getUnidentifiedAccessKey().orElseThrow()),
|
||||||
() -> assertTrue(account.getRegistrationLock().verify(clientRegistrationLock)),
|
() -> assertTrue(account.getRegistrationLock().verify(clientRegistrationLock)),
|
||||||
() -> assertEquals(unrestrictedUnidentifiedAcces, account.isUnrestrictedUnidentifiedAccess())
|
() -> assertEquals(unrestrictedUnidentifiedAccess, account.isUnrestrictedUnidentifiedAccess())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ class OptionalAccessTest {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
OptionalAccess.verify(Optional.empty(), Optional.empty(), Optional.of(account));
|
OptionalAccess.verify(Optional.empty(), Optional.empty(), Optional.of(account));
|
||||||
throw new AssertionError("shold fai");
|
throw new AssertionError("should fail");
|
||||||
} catch (WebApplicationException e) {
|
} catch (WebApplicationException e) {
|
||||||
assertEquals(e.getResponse().getStatus(), 401);
|
assertEquals(e.getResponse().getStatus(), 401);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue