protected override void TestCleanup()
        {
            // TestCleanup() may be not main thread
            DynamicVCException.SetCleanUp(true);

            base.TestCleanup();

            this.TestSite.Log.Add(LogEntryKind.Comment, "Dispose virtual channel manager.");
            if (rdpedycServer != null)
            {
                rdpedycServer.Dispose();
            }

            this.TestSite.Log.Add(LogEntryKind.Comment, "Trigger client to close all RDP connections for clean up.");
            StopRDPConnection();
            this.TestSite.Log.Add(LogEntryKind.Comment, "Stop RDP listening.");
            this.rdpbcgrAdapter.StopRDPListening();

            DynamicVCException.SetCleanUp(false);
        }
Example #2
0
        protected override void TestCleanup()
        {
            base.TestCleanup();

            rdpbcgrServer.Dispose();

            if (rdpedycServer != null)
            {
                rdpedycServer.Dispose();
            }

            this.TestSite.Log.Add(LogEntryKind.Comment, "Trigger client to close all RDP connections for clean up.");
            int iResult = this.sutControlAdapter.TriggerClientDisconnectAll(this.TestContext.TestName);

            this.TestSite.Log.Add(LogEntryKind.Debug, "The result of TriggerClientDisconnectAll is {0}.", iResult);

            if (rdpemtServerL != null)
            {
                rdpemtServerL.Dispose();
            }

            if (rdpemtServerR != null)
            {
                rdpemtServerR.Dispose();
            }
            if (rdpeudpServer != null && rdpeudpServer.Running)
            {
                rdpeudpServer.Stop();
            }
            if (rdpeudpSocketR != null && rdpeudpSocketR.Connected)
            {
                rdpeudpSocketR.Close();
            }
            if (rdpeudpSocketL != null && rdpeudpSocketL.Connected)
            {
                rdpeudpSocketL.Close();
            }

            this.TestSite.Log.Add(LogEntryKind.Comment, "Stop RDP listening.");
            this.rdpbcgrAdapter.StopRDPListening();
        }
        protected override void TestCleanup()
        {
            base.TestCleanup();

            rdpbcgrServer?.Dispose();

            if (rdpedycServer != null)
            {
                rdpedycServer.Dispose();
            }

            this.TestSite.Log.Add(LogEntryKind.Comment, "Trigger client to close all RDP connections for clean up.");

            TriggerClientDisconnectAll();

            if (rdpemtServerL != null)
            {
                rdpemtServerL.Dispose();
            }

            if (rdpemtServerR != null)
            {
                rdpemtServerR.Dispose();
            }
            if (rdpeudpServer != null)
            {
                rdpeudpServer.Stop();
            }
            if (rdpeudpSocketR != null && rdpeudpSocketR.Connected)
            {
                rdpeudpSocketR.Close();
            }
            if (rdpeudpSocketL != null && rdpeudpSocketL.Connected)
            {
                rdpeudpSocketL.Close();
            }

            this.TestSite.Log.Add(LogEntryKind.Comment, "Stop RDP listening.");
            this.rdpbcgrAdapter?.StopRDPListening();
        }
        protected override void TestCleanup()
        {
            // TestCleanup() may be not main thread
            DynamicVCException.SetCleanUp(true);

            base.TestCleanup();

            this.TestSite.Log.Add(LogEntryKind.Comment, "Dispose virtual channel manager.");
            if (rdpedycServer != null)
            {
                rdpedycServer.Dispose();
            }

            this.TestSite.Log.Add(LogEntryKind.Comment, "Trigger client to close all RDP connections for clean up.");
            int iResult = this.sutControlAdapter.TriggerClientDisconnectAll(this.TestContext.TestName);

            this.TestSite.Log.Add(LogEntryKind.Debug, "The result of TriggerClientDisconnectAll is {0}.", iResult);

            this.TestSite.Log.Add(LogEntryKind.Comment, "Stop RDP listening.");
            this.rdpbcgrAdapter.StopRDPListening();

            DynamicVCException.SetCleanUp(false);
        }