From a62183c9e0f26f37c4bbd103e744dc4fd83b4534 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Fri, 6 Mar 2020 10:20:16 -0500 Subject: [PATCH] Reduce AttachmentCipherTest flakiness. --- .../signalservice/api/crypto/AttachmentCipherTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsignal/service/src/test/java/org/whispersystems/signalservice/api/crypto/AttachmentCipherTest.java b/libsignal/service/src/test/java/org/whispersystems/signalservice/api/crypto/AttachmentCipherTest.java index 8c273ed760..96f922372f 100644 --- a/libsignal/service/src/test/java/org/whispersystems/signalservice/api/crypto/AttachmentCipherTest.java +++ b/libsignal/service/src/test/java/org/whispersystems/signalservice/api/crypto/AttachmentCipherTest.java @@ -129,7 +129,7 @@ public class AttachmentCipherTest extends TestCase { EncryptResult encryptResult = encryptData(plaintextInput, key); byte[] badMacCiphertext = Arrays.copyOf(encryptResult.ciphertext, encryptResult.ciphertext.length); - badMacCiphertext[badMacCiphertext.length - 1] = 0; + badMacCiphertext[badMacCiphertext.length - 1] += 1; cipherFile = writeToFile(badMacCiphertext); @@ -191,7 +191,7 @@ public class AttachmentCipherTest extends TestCase { EncryptResult encryptResult = encryptData(plaintextInput, expandPackKey(packKey)); byte[] badMacCiphertext = Arrays.copyOf(encryptResult.ciphertext, encryptResult.ciphertext.length); - badMacCiphertext[badMacCiphertext.length - 1] = 0; + badMacCiphertext[badMacCiphertext.length - 1] += 1; AttachmentCipherInputStream.createForStickerData(badMacCiphertext, packKey); } catch (InvalidMessageException e) {