From fcd442576e2733e41221e8c39773ad8b28265bd5 Mon Sep 17 00:00:00 2001 From: "miroslav.kovac" Date: Wed, 8 Mar 2017 10:06:24 +0100 Subject: [PATCH] Unit test for NoProgressException class Change-Id: I382413bbf2e088f4a55a7f1a1c0af18e4603705f Signed-off-by: miroslav.kovac --- .../client/NoProgressExceptionTest.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/NoProgressExceptionTest.java diff --git a/opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/NoProgressExceptionTest.java b/opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/NoProgressExceptionTest.java new file mode 100644 index 0000000000..e4d1005fd7 --- /dev/null +++ b/opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/NoProgressExceptionTest.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ +package org.opendaylight.controller.cluster.access.client; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import org.junit.Test; +import org.opendaylight.controller.cluster.access.concepts.RequestException; + +public class NoProgressExceptionTest { + + private static final RequestException OBJECT = new NoProgressException(1000000000); + + @Test + public void isRetriable() { + assertFalse(OBJECT.isRetriable()); + } + + @Test + public void checkMessage() { + String message = OBJECT.getMessage(); + assertTrue("No progress in 1 seconds".equals(message)); + assertNull(OBJECT.getCause()); + } + +} -- 2.36.6