public void sendMessagesToNewKernel()
 {
     DI.log.info("in sendMessagesToNewKernel");
     o2WcfProxy = O2WcfUtils.createClientProxy(newO2KernelProcessName);
     Assert.That(o2WcfProxy.allOK(), "o2WcfProxy.allOK() returned false");
     Assert.That(!string.IsNullOrEmpty(o2WcfProxy.getName()), "o2WcfProxy.getName() was null or empty");
     DI.log.info("o2WcfProxy Name: {0}", o2WcfProxy.getName());
     o2WcfProxy.o2ShellCommand("echo Hello_from_another_process");
 }
Esempio n. 2
0
        public void CreateRemoteO2KernelAndGetProxy()
        {
            var newO2KernelProcessName = "Client_O2Kernel";

            DI.log.info("Creating new O2Kernel Process with Name: {0}", DI.config.O2KernelAssemblyName);
            Processes.startProcess(DI.config.O2KernelAssemblyName, newO2KernelProcessName);
            o2WcfProxy = O2WcfUtils.createClientProxy(newO2KernelProcessName);
            Assert.That(o2WcfProxy.allOK(), "o2WcfProxy.allOK() returned false");
            Assert.That(!string.IsNullOrEmpty(o2WcfProxy.getName()), "o2WcfProxy.getName() was null or empty");
        }
        public void test_openCirDataControlOnRemoteWcfHost()
        {
            DI.log.info("Creating new O2Kernel Process with Name: {0}", DI.config.O2KernelAssemblyName);
            Processes.startProcess(DI.config.O2KernelAssemblyName, newO2KernelProcessName);
            IO2WcfKernelMessage o2WcfProxy = O2WcfUtils.createClientProxy(newO2KernelProcessName);

            Assert.That(o2WcfProxy.allOK(), "o2WcfProxy.allOK() returned false");
            DI.log.info("o2WcfProxy.allOK() = {0}", o2WcfProxy.allOK());
            // confirm that o2WcfProxy is running of a different process
            var currentProcessID = Processes.getCurrentProcessID();
            var remoteProcessID  = o2WcfProxy.getO2KernelProcessId();

            DI.log.info("Processes ID -> Current:  {0} remote: {1}", currentProcessID, remoteProcessID);
            Assert.That(currentProcessID != remoteProcessID, "Processes ID should not be the same");

            runTestsViaWcfProxy(o2WcfProxy);
            // close remote proxy and process
            var process = Processes.getProcess(o2WcfProxy.getO2KernelProcessId());

            o2WcfProxy.closeO2KernelProcess();
            process.WaitForExit();      // wait for its exit
        }