From 261c08086c0a6dc6c9f9400017a1c1a03cbece23 Mon Sep 17 00:00:00 2001 From: ylecollen Date: Wed, 4 Jan 2017 12:35:15 +0100 Subject: the OlmInboundGroupSession methods trigger an exception when they fails --- .../androidTest/java/org/matrix/olm/OlmGroupSessionTest.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'java/android/OlmLibSdk/olm-sdk/src/androidTest') diff --git a/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmGroupSessionTest.java b/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmGroupSessionTest.java index 0f0d779..9526410 100644 --- a/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmGroupSessionTest.java +++ b/java/android/OlmLibSdk/olm-sdk/src/androidTest/java/org/matrix/olm/OlmGroupSessionTest.java @@ -138,7 +138,13 @@ public class OlmGroupSessionTest { @Test public void test08GetInboundGroupSessionIdentifier() { // check both session identifiers are equals - mBobSessionIdentifier = mBobInboundGroupSession.sessionIdentifier(); + mBobSessionIdentifier = null; + + try { + mBobSessionIdentifier = mBobInboundGroupSession.sessionIdentifier(); + } catch (Exception e) { + assertTrue(e.getMessage(), false); + } assertFalse(TextUtils.isEmpty(mBobSessionIdentifier)); } @@ -479,7 +485,7 @@ public class OlmGroupSessionTest { String exceptionMessage = null; try { bobInboundGroupSession.decryptMessage(corruptedEncryptedMsg); - } catch (OlmInboundGroupSession.DecryptMessageException e) { + } catch (OlmException e) { exceptionMessage = e.getMessage(); } -- cgit v1.2.3