package org.opendaylight.openflowplugin.openflow.md.core;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
import java.math.BigInteger;
import java.util.ArrayList;
import org.mockito.Mockito;
import org.mockito.runners.MockitoJUnitRunner;
import org.opendaylight.openflowplugin.api.OFConstants;
+import org.opendaylight.openflowplugin.api.openflow.md.core.ConnectionConductor;
+import org.opendaylight.openflowplugin.api.openflow.md.core.IMDMessageTranslator;
import org.opendaylight.openflowplugin.api.openflow.md.core.SwitchConnectionDistinguisher;
import org.opendaylight.openflowplugin.api.openflow.md.core.TranslatorKey;
import org.opendaylight.openflowplugin.openflow.md.core.plan.ConnectionAdapterStackImpl;
import org.opendaylight.openflowplugin.openflow.md.core.plan.EventFactory;
import org.opendaylight.openflowplugin.openflow.md.core.plan.SwitchTestEvent;
-import org.opendaylight.openflowplugin.openflow.md.core.session.SessionContext;
-import org.opendaylight.openflowplugin.openflow.md.queue.PopListener;
+import org.opendaylight.openflowplugin.api.openflow.md.core.session.SessionContext;
+import org.opendaylight.openflowplugin.api.openflow.md.queue.PopListener;
import org.opendaylight.openflowplugin.openflow.md.queue.QueueProcessorLightImpl;
import org.opendaylight.openflowplugin.api.statistics.MessageSpy;
import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.Capabilities;
EventFactory.DEFAULT_VERSION, getFeatureResponseMsg()));
int i = 1;
- eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "setConfig"));
eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
EventFactory.DEFAULT_VERSION, getFeatureResponseMsg()));
int i = 1;
- eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "setConfig"));
eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
EventFactory.DEFAULT_VERSION, getFeatureResponseMsg()));
int i = 1;
- eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "setConfig"));
eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
executeNow();
EventFactory.DEFAULT_VERSION, getFeatureResponseMsg()));
int i = 1;
- eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "setConfig"));
eventPlan.add(0, EventFactory.createDefaultWaitForRpcEvent(i++, "multipartRequestInput"));
executeNow();
Assert.assertEquals(connectionConductor.getSessionContext().getPhysicalPort(portNumberV10), msg);
}
+
+ @Test
+ public void testHandshakeFailOperations(){
+ connectionConductor.onHandshakeFailure();
+ connectionConductor.checkState(ConnectionConductor.CONDUCTOR_STATE.RIP);
+ }
private void simulateV13PostHandshakeState(ConnectionConductorImpl conductor) {
GetFeaturesOutputBuilder featureOutput = getFeatureResponseMsg();
conductor.postHandshakeBasic(featureOutput.build(), OFConstants.OFP_VERSION_1_3);