public void Connect(Guid id) { try { _wrappedConnection.Connect(_wrappedConnection.ID); } catch (FallbackException) { Dev2Logger.Log.Info("Falling Back to previous signal r client"); var name = _wrappedConnection.DisplayName; if (AuthenticationType == AuthenticationType.User) { _wrappedConnection = new ServerProxyWithChunking(_wrappedConnection.WebServerUri.ToString(), UserName, Password) { DisplayName = name, }; } else { _wrappedConnection = new ServerProxyWithChunking(_wrappedConnection.WebServerUri) { DisplayName = name }; } SetupPassthroughEvents(); _wrappedConnection.Connect(_wrappedConnection.ID); _wrappedConnection.DisplayName = name; } catch (Exception err) { Dev2Logger.Log.Error(err); throw; } }
public void Connect(Guid id) { try { _wrappedConnection.Connect(_wrappedConnection.ID); } catch (Exception err) { Dev2Logger.Error(err, "Warewolf Error"); } }
public void EnvironmentConnectionReconnectToServerExpecetedClientConnectionSuccessful() { IEnvironmentConnection conn = CreateConnection(); conn.Connect(Guid.Empty); conn.Disconnect(); Thread.Sleep(100); conn.Connect(Guid.Empty); Thread.Sleep(500); bool afterReconnection = conn.IsConnected; Assert.IsTrue(afterReconnection); conn.Disconnect(); }
public void EnvironmentTestsInitialize() { var setupEnvironmentConnection = SetupEnvironmentConnection(); _connection = setupEnvironmentConnection; _connection.Connect(Guid.Empty); }
public void EnvironmentConnection_AddResource_NewResource_Expected_NewResourceAddedToServer() { var xmlString = CreateDataObject("FindResourceService", "*"); IEnvironmentConnection conn = CreateConnection(); conn.Connect(Guid.Empty); if (conn.IsConnected) { var returnData = conn.ExecuteCommand(xmlString, Guid.Empty); Assert.IsTrue(returnData.Contains("Workflow")); } else { Assert.Fail("Unable to create a connection to the server"); } conn.Connect(Guid.Empty); }
public void EnvironmentConnection_ConnectToAvailableServer_Expected_ConnectionSuccesful() { IEnvironmentConnection conn = CreateConnection(); conn.Connect(Guid.Empty); Assert.IsTrue(conn.IsConnected); conn.Disconnect(); }
public void EnsureServerListensOnLocalhost_ExpectedConnectionSuccessful() { var setupEnvironmentConnection = SetupEnvironmentConnection(); IEnvironmentConnection conn = setupEnvironmentConnection; conn.Connect(Guid.Empty); Assert.IsTrue(conn.IsConnected); conn.Disconnect(); }
public void EnvironmentConnection_FindResources_Expected() { var request = CreateDataObject("FindResourceService", "*"); IEnvironmentConnection conn = CreateConnection(); conn.Connect(Guid.Empty); if (conn.IsConnected) { var returnData = conn.ExecuteCommand(request, Guid.Empty, Guid.Empty); Assert.IsTrue(returnData.Contains("Workflow")); } else { Assert.Fail("Unable to create a connection to the server"); } conn.Connect(Guid.Empty); }
public void EnsureServerListensOnPcName_ExpectedConnectionSuccessful() { var setupEnvironmentConnection = SetupEnvironmentConnection(); IEnvironmentConnection conn = setupEnvironmentConnection; conn.Connect(Guid.Empty); var res = conn.IsConnected; conn.Disconnect(); Assert.IsTrue(res); }
public void EnvironmentConnectionWithServerAuthenticationExpectedClientDetailsRecieved() { IEnvironmentConnection conn = CreateConnection(); conn.Connect(Guid.Empty); // The IsConnected property of the EnvironmentConnection references the TCPDispatch Client // Only if the connection to the server is successfully made by the dispatch client will the // IsConnected message return true Assert.IsTrue(conn.IsConnected); conn.Disconnect(); }