Beispiel #1
0
        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;
            }
        }
Beispiel #2
0
        public void Connect(Guid id)
        {
            try
            {
                _wrappedConnection.Connect(_wrappedConnection.ID);
            }

            catch (Exception err)
            {
                Dev2Logger.Error(err, "Warewolf Error");
            }
        }
Beispiel #3
0
        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();
        }
Beispiel #4
0
        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();
        }
Beispiel #7
0
        public void EnsureServerListensOnLocalhost_ExpectedConnectionSuccessful()
        {
            var setupEnvironmentConnection = SetupEnvironmentConnection();
            IEnvironmentConnection conn    = setupEnvironmentConnection;

            conn.Connect(Guid.Empty);
            Assert.IsTrue(conn.IsConnected);
            conn.Disconnect();
        }
Beispiel #8
0
        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);
        }
Beispiel #9
0
        public void EnsureServerListensOnPcName_ExpectedConnectionSuccessful()
        {
            var setupEnvironmentConnection = SetupEnvironmentConnection();
            IEnvironmentConnection conn    = setupEnvironmentConnection;

            conn.Connect(Guid.Empty);
            var res = conn.IsConnected;

            conn.Disconnect();
            Assert.IsTrue(res);
        }
Beispiel #10
0
        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();
        }
 public void EnvironmentTestsInitialize()
 {
     var setupEnvironmentConnection = SetupEnvironmentConnection();
     _connection = setupEnvironmentConnection;
     _connection.Connect(Guid.Empty);
 }