public override bool Load( TestPackage package )
		{
			Unload();

            log.Info("Loading " + package.Name);
			try
			{
				if ( this.domain == null )
					this.domain = Services.DomainManager.CreateDomain( package );

                if (this.agent == null)
                {
                    this.agent = DomainAgent.CreateInstance(domain);
                    this.agent.Start();
                }
            
				if ( this.TestRunner == null )
					this.TestRunner = this.agent.CreateRunner( this.ID );

                log.Info(
                    "Loading tests in AppDomain, see {0}_{1}.log", 
                    domain.FriendlyName, 
                    Process.GetCurrentProcess().Id);

				return TestRunner.Load( package );
			}
			catch
			{
                log.Error("Load failure");
				Unload();
				throw;
			}
		}
Example #2
0
        public override bool Load( TestPackage package )
        {
            Unload();

            try
            {
                if ( domain == null )
                {
                    domain = DomainManager.CreateDomain( package );
                }

                if ( agent == null )
                {
                    agent = DomainAgent.CreateInstance( domain );
                    agent.Start();
                }

                if ( TestRunner == null )
                {
                    TestRunner = agent.CreateRunner( ID );
                }

                return TestRunner.Load( package );
            }
            catch
            {
                Unload();
                throw;
            }
        }
		public override void Unload()
		{
            if (this.TestRunner != null)
            {
                log.Info("Unloading");
                this.TestRunner.Unload();
                this.TestRunner = null;
            }

            if (this.agent != null)
            {
                log.Info("Stopping DomainAgent");
                this.agent.Dispose();
                this.agent = null;
            }

			if(domain != null) 
			{
                log.Info("Unloading AppDomain " + domain.FriendlyName);
				Services.DomainManager.Unload(domain);
				domain = null;
			}
		}
Example #4
0
        public override void Unload()
        {
            if ( TestRunner != null )
            {
                TestRunner.Unload();
                TestRunner = null;
            }

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

            if ( domain != null )
            {
                DomainManager.Unload( domain );
                domain = null;
            }
        }
Example #5
0
        public override void Unload()
        {
            if (this.TestRunner != null)
            {
                this.TestRunner.Unload();
                this.TestRunner = null;
            }

            if (this._agent != null)
            {
                this._agent.Dispose();
                this._agent = null;
            }

            if (this._domain == null)
                return;
            Services.DomainManager.Unload(this._domain);
            this._domain = null;
        }
Example #6
0
        public override bool Load(TestPackage package)
        {
            this.Unload();
            try
            {
                if (this._domain == null)
                    this._domain = this.CreateDomain(package);
                if (this._agent == null)
                {
                    this._agent = DomainAgent.CreateInstance(this._domain);
                    this._agent.Start();
                }

                if (this.TestRunner == null)
                    this.TestRunner = this._agent.CreateRunner(this.ID);
                return this.TestRunner.Load(package);
            }
            catch
            {
                this.Unload();
                throw;
            }
        }