Check properties of events.

This commit is contained in:
akwizgran
2022-08-02 15:24:20 +01:00
parent 848872a803
commit 1699d6b5f8
4 changed files with 123 additions and 106 deletions

View File

@@ -338,6 +338,17 @@ public class TestUtils {
return false;
}
public static <E extends Event> E getEvent(Transaction txn,
Class<E> eventClass) {
for (CommitAction action : txn.getActions()) {
if (action instanceof EventAction) {
Event event = ((EventAction) action).getEvent();
if (eventClass.isInstance(event)) return eventClass.cast(event);
}
}
throw new AssertionError();
}
public static boolean isCryptoStrengthUnlimited() {
try {
return Cipher.getMaxAllowedKeyLength("AES/CBC/PKCS5Padding")