public override bool Load(TestPackage package) { if (this.agent == null) { this.agent = Services.TestAgency.GetAgent(AgentType.ProcessAgent, 5000); } if (this.TestRunner == null) { this.TestRunner = agent.CreateRunner(this.runnerID); } return(base.Load(package)); }
public override bool Load(TestPackage package) { log.Info("Loading " + package.Name); Unload(); RuntimeFramework runtimeFramework = package.Settings["RuntimeFramework"] as RuntimeFramework; if (runtimeFramework == null) { runtimeFramework = RuntimeFramework.CurrentFramework; } bool enableDebug = package.GetSetting("EnableDebug", false); bool loaded = false; try { if (this.agent == null) { this.agent = Services.TestAgency.GetAgent( runtimeFramework, 20000, enableDebug); } if (this.agent == null) { return(false); } if (this.TestRunner == null) { this.TestRunner = agent.CreateRunner(this.runnerID); } loaded = base.Load(package); return(loaded); } finally { // Clean up if the load failed if (!loaded) { Unload(); } } }