private static void RouteEvent( EPRuntime epService, int intValue) { var theEvent = new SupportBean(); theEvent.IntPrimitive = intValue; epService.EventService.RouteEventBean(theEvent, theEvent.GetType().Name); }
private static SupportBean MakeSendEvent( RegressionEnvironment env, string theString, int intPrimitive) { var b = new SupportBean(theString, intPrimitive); env.EventService.SendEventBean(b, b.GetType().Name); return b; }
public object Call() { try { for (var loop = 0; loop < numRepeats; loop++) { var eventOne = new SupportBean(); eventOne.TheString = "E1_" + threadKey; runtime.EventService.SendEventBean(eventOne, eventOne.GetType().Name); var eventTwo = new SupportMarketDataBean("E2_" + threadKey, 0d, null, null); runtime.EventService.SendEventBean(eventTwo, eventTwo.GetType().Name); } } catch (Exception ex) { log.Error("Error in thread " + Thread.CurrentThread.ManagedThreadId, ex); return false; } return true; }
public object Call() { try { for (var loop = 0; loop < numRepeats; loop++) { log.Info(".call Thread " + Thread.CurrentThread.ManagedThreadId + " sending event " + loop); var id = Convert.ToString(threadNum * 100000000 + loop); var bean = new SupportBean(id, 0); runtime.EventService.SendEventBean(bean, bean.GetType().Name); for (var i = 0; i < stmt.Length; i++) { log.Info(".call Thread " + Thread.CurrentThread.ManagedThreadId + " starting iterator " + loop); var found = false; using (IEnumerator<EventBean> enumerator = stmt[i].GetSafeEnumerator()) { while (enumerator.MoveNext()) { var theEvent = enumerator.Current; if (theEvent.Get("TheString").Equals(id)) { found = true; } } } Assert.IsTrue(found); log.Info(".call Thread " + Thread.CurrentThread.ManagedThreadId + " end iterator " + loop); } } //} catch (AssertionException ex) { // log.Error("Assertion error in thread " + Thread.CurrentThread.ManagedThreadId, ex); // return false; } catch (Exception t) { log.Error("Error in thread " + Thread.CurrentThread.ManagedThreadId, t); return false; } return true; }
public object Call() { try { log.Info(".call Thread " + Thread.CurrentThread.ManagedThreadId + " sending " + numRepeats + " events"); for (var loop = 0; loop < numRepeats; loop++) { var id = Convert.ToString(threadNum * 100000000 + loop); var bean = new SupportBean(id, 0); runtime.EventService.SendEventBean(bean, bean.GetType().Name); } log.Info(".call Thread " + Thread.CurrentThread.ManagedThreadId + " completed."); } catch (AssertionException ex) { log.Error("Assertion error in thread " + Thread.CurrentThread.ManagedThreadId, ex); return false; } catch (Exception t) { log.Error("Error in thread " + Thread.CurrentThread.ManagedThreadId, t); return false; } return true; }