Skip to content

Commit be90a58

Browse files
Fixed flaky test
1 parent 62c6ae8 commit be90a58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/com/hyperwallet/clientsdk/util/HyperwalletEncryptionTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import static org.hamcrest.Matchers.containsString;
2727
import static org.hamcrest.Matchers.equalTo;
2828
import static org.hamcrest.Matchers.is;
29+
import static org.hamcrest.Matchers.anyOf;
2930
import static org.hamcrest.Matchers.notNullValue;
3031
import static org.testng.Assert.fail;
3132

@@ -86,7 +87,7 @@ public void shouldThrowExceptionWhenDecryptionIsMadeByKeyOtherThanUsedForEncrypt
8687
hyperwalletEncryption.decrypt(encryptedPayload);
8788
fail("Expected JOSEException");
8889
} catch (JOSEException e) {
89-
assertThat(e.getMessage(), is(containsString("Decryption error")));
90+
assertThat(e.getMessage(), anyOf(containsString("Decryption error"),containsString("Message is larger than modulus")));
9091
}
9192
}
9293

0 commit comments

Comments
 (0)