示例#1
0
 public void getFuture()
 {
     _log.Debug("Running: getFuture");
     _future = new ResultFuture();
     _future.Session = new Session(new byte[1]);
     Thread t = new Thread(Go);
     t.Start();
     Struct result = _future.Get(2000);
     Assert.IsNotNull(result);
 }
示例#2
0
 public void getFutureTimeout()
 {
     _log.Debug("Running: getFutureTimeout");                        
     _future = new ResultFuture();
     _future.Session = new Session(new byte[1]);
     DateTime start = DateTime.Now;
     Struct result = _future.Get(1000);
     Assert.IsTrue(DateTime.Now.Subtract(start).TotalMilliseconds >= 1000);
     Assert.IsNull(result);           
 }