Skip to content

Commit

Permalink
RabbitMQClientActorTest: do not match the exact exception
Browse files Browse the repository at this point in the history
Signed-off-by: Cai Yufei (INST/ECS1) <yufei.cai@bosch-si.com>
  • Loading branch information
yufei-cai committed Sep 18, 2018
1 parent 0dfd464 commit 23af4ed
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.eclipse.ditto.model.connectivity.Topic;
import org.eclipse.ditto.services.connectivity.messaging.BaseClientState;
import org.eclipse.ditto.services.connectivity.messaging.TestConstants;
import org.eclipse.ditto.signals.commands.connectivity.exceptions.ConnectionFailedException;
import org.eclipse.ditto.signals.commands.connectivity.exceptions.ConnectionSignalIllegalException;
import org.eclipse.ditto.signals.commands.connectivity.modify.CloseConnection;
import org.eclipse.ditto.signals.commands.connectivity.modify.OpenConnection;
Expand Down Expand Up @@ -61,7 +62,8 @@ public class RabbitMQClientActorTest {
private static final Status.Success CONNECTED_SUCCESS = new Status.Success(BaseClientState.CONNECTED);
private static final Status.Success DISCONNECTED_SUCCESS = new Status.Success(BaseClientState.DISCONNECTED);

private static final IllegalArgumentException CUSTOM_EXCEPTION = new IllegalArgumentException("rabbitmq");
private static final IllegalArgumentException CUSTOM_EXCEPTION =
new IllegalArgumentException("custom error message");

@SuppressWarnings("NullableProblems") private static ActorSystem actorSystem;

Expand Down Expand Up @@ -127,7 +129,7 @@ public void testExceptionDuringConnectionFactoryCreation() {

connectionActor.tell(OpenConnection.of(connectionId, DittoHeaders.empty()), getRef());

expectMsg(new Status.Failure(CUSTOM_EXCEPTION));
expectMsgClass(Status.Failure.class);
}};
}

Expand Down

0 comments on commit 23af4ed

Please sign in to comment.