public void Run(RegressionEnvironment env) { foreach (var rep in EventRepresentationChoiceExtensions.Values()) { TryAssertionVariantStream(env, rep); } }
public void Run(RegressionEnvironment env) { var milestone = new AtomicLong(); foreach (var rep in EventRepresentationChoiceExtensions.Values()) { TryAssertionScoringUseCase(env, rep, milestone); } }
public void Run(RegressionEnvironment env) { TryAssertionFragment(env, EventRepresentationChoice.JSON); foreach (var rep in EventRepresentationChoiceExtensions.Values()) { TryAssertionFragment(env, rep); } }
public void Run(RegressionEnvironment env) { // TBD: remove this case TryAssertionSubselect(env, EventRepresentationChoice.JSON); foreach (var rep in EventRepresentationChoiceExtensions.Values()) { TryAssertionSubselect(env, rep); } }
public static IList<RegressionExecution> WithDispatchBackQueue(IList<RegressionExecution> execs = null) { execs = execs ?? new List<RegressionExecution>(); foreach (var rep in EventRepresentationChoiceExtensions.Values()) { execs.Add(new InfraDispatchBackQueue(rep)); } return execs; }
public static IList<RegressionExecution> WithEventTypeColumnDef(IList<RegressionExecution> execs = null) { execs = execs ?? new List<RegressionExecution>(); foreach (var rep in EventRepresentationChoiceExtensions.Values()) { execs.Add(new InfraEventTypeColumnDef(rep)); } return execs; }
public void Run(RegressionEnvironment env) { foreach (EventRepresentationChoice rep in EventRepresentationChoiceExtensions.Values()) { if (rep.IsJsonProvidedClassEvent()) { // assertion uses inheritance of types continue; } TryAssertionNamedWindow(env, rep); } }
public void Run(RegressionEnvironment env) { foreach (var rep in EventRepresentationChoiceExtensions.Values()) { if (rep.IsMapEvent() || rep.IsObjectArrayEvent()) { TryAssertionInheritance(env, rep); } } }
public void Run(RegressionEnvironment env) { foreach (var rep in EventRepresentationChoiceExtensions.Values()) { RunAssertionCreateStream(env, rep); } foreach (var rep in EventRepresentationChoiceExtensions.Values()) { RunAssertionCreateStreamTwo(env, rep); } foreach (var rep in EventRepresentationChoiceExtensions.Values()) { RunAssertPopulateFromNamedWindow(env, rep); } RunAssertionObjectArrPropertyReorder(env); }
public void Run(RegressionEnvironment env) { foreach (var rep in EventRepresentationChoiceExtensions.Values()) { TryAssertionCreateSchemaModelAfter(env, rep); } // test model-after for PONO with inheritance var path = new RegressionPath(); env.CompileDeploy("create window ParentWindow#keepall as select * from SupportBeanAtoFBase", path); env.CompileDeploy("insert into ParentWindow select * from SupportBeanAtoFBase", path); env.CompileDeploy("create window ChildWindow#keepall as select * from SupportBean_A", path); env.CompileDeploy("insert into ChildWindow select * from SupportBean_A", path); var parentQuery = "@Name('s0') select parent from ParentWindow as parent"; env.CompileDeploy(parentQuery, path).AddListener("s0"); env.SendEventBean(new SupportBean_A("E1")); Assert.AreEqual(1, env.Listener("s0").NewDataListFlattened.Length); env.UndeployAll(); }
public void Run(RegressionEnvironment env) { foreach (var rep in EventRepresentationChoiceExtensions.Values()) { TryAssertionCreateSchema(env, rep); } // test Bean-type Date-type timestamps var typeName = typeof(SupportBean).FullName; var startA = "2002-05-30T09:00:00.000"; var epl = $"create schema SupportBeanXXX as {typeName} starttimestamp LongPrimitive endtimestamp LongBoxed;\n" + $"@Name('s0') select a.Get('month') as val0 from SupportBeanXXX a;\n"; env.CompileDeployWBusPublicType(epl, new RegressionPath()).AddListener("s0"); var theEvent = new SupportBean(); theEvent.LongPrimitive = DateTimeParsingFunctions.ParseDefaultMSec(startA); env.EventService.SendEventBean(theEvent, "SupportBeanXXX"); Assert.AreEqual(5, env.Listener("s0").AssertOneGetNewAndReset().Get("val0")); env.UndeployAll(); }
public void Run(RegressionEnvironment env) { var path = new RegressionPath(); var jsonSchemas = "@public @buseventtype create json schema S0_JSON(Id String, P00 int);\n" + "@public @buseventtype create json schema S1_JSON(Id String, P00 int);\n" + "@public @buseventtype @JsonSchema(ClassName='" + typeof(MyLocalJsonProvidedS0).FullName + "') create json schema S0_JSONCLASSPROVIDED();\n" + "@public @buseventtype @JsonSchema(ClassName='" + typeof(MyLocalJsonProvidedS1).FullName + "') create json schema S1_JSONCLASSPROVIDED();\n"; env.CompileDeploy(jsonSchemas, path); var milestone = new AtomicLong(); foreach (var rep in EventRepresentationChoiceExtensions.Values()) { var s0Type = "S0_" + rep.GetName(); var s1Type = "S1_" + rep.GetName(); var eplOne = "select S0.Id as s0id, S1.Id as s1id, S0.P00 as s0p00, S1.P00 as s1p00 from " + s0Type + "#keepall as S0, " + s1Type + "#keepall as S1 " + " where S0.Id = S1.Id"; TryJoinAssertion(env, eplOne, rep, "s0id,s1id,s0p00,s1p00", milestone, path, typeof(MyLocalJsonProvidedWFields)); } foreach (var rep in EventRepresentationChoiceExtensions.Values()) { var s0Type = "S0_" + rep.GetName(); var s1Type = "S1_" + rep.GetName(); var eplTwo = "select * from " + s0Type + "#keepall as s0, " + s1Type + "#keepall as s1 " + " where s0.Id = s1.Id"; TryJoinAssertion(env, eplTwo, rep, "s0.Id,s1.Id,s0.P00,s1.P00", milestone, path, typeof(MyLocalJsonProvidedWildcard)); } env.UndeployAll(); }
public void Run(RegressionEnvironment env) { foreach (var rep in EventRepresentationChoiceExtensions.Values()) { RunAssertionEventBeanAnnotation(env, rep); } }
public void Run(RegressionEnvironment env) { foreach (EventRepresentationChoice rep in EventRepresentationChoiceExtensions.Values()) { TryAssertionStreamInsertWWidenMap(env, rep); } }
public void Run(RegressionEnvironment env) { foreach (EventRepresentationChoice rep in EventRepresentationChoiceExtensions.Values()) { TryAssertionInvalid(env, rep); } }
public void Run(RegressionEnvironment env) { foreach (var rep in EventRepresentationChoiceExtensions.Values()) { TryAssertionWildcard(env, false, rep); } }
public void Run(RegressionEnvironment env) { foreach (var rep in EventRepresentationChoiceExtensions.Values()) { TryAssertionInsertWhereOMStaggered(env, rep); } }
public void Run(RegressionEnvironment env) { foreach (var rep in EventRepresentationChoiceExtensions.Values()) { TryAssertionSingleRowSplitAndType(env, rep); } }
public void Run(RegressionEnvironment env) { foreach (var rep in EventRepresentationChoiceExtensions.Values()) { RunTransposeMapAndObjectArray(env, rep); } }
public void Run(RegressionEnvironment env) { foreach (var rep in EventRepresentationChoiceExtensions.Values()) { TryAssertionInnerJoinLateStart(env, rep); } }
public void Run(RegressionEnvironment env) { foreach (var rep in EventRepresentationChoiceExtensions.Values()) { TryAssertionSplitPremptiveNamedWindow(env, rep); } }
private static void Configure(Configuration configuration) { foreach (var clazz in new Type[] { typeof(SupportBean), typeof(OrderBean), typeof(BookDesc), typeof(SentenceEvent), typeof(SupportStringBeanWithArray), typeof(SupportBeanArrayCollMap), typeof(SupportObjectArrayEvent), typeof(SupportCollectionEvent), typeof(SupportResponseEvent), typeof(SupportAvroArrayEvent), typeof(SupportJsonArrayEvent) }) { configuration.Common.AddEventType(clazz); } var innerMapDef = Collections.SingletonDataMap("p", typeof(string)); configuration.Common.AddEventType("MyInnerMap", innerMapDef); var outerMapDef = Collections.SingletonDataMap("i", "MyInnerMap[]"); configuration.Common.AddEventType("MyOuterMap", outerMapDef); var funcs = new [] { "SplitSentence","SplitSentenceBean","SplitWord" }; for (var i = 0; i < funcs.Length; i++) { foreach (var rep in EventRepresentationChoiceExtensions.Values()) { string[] methods; if (rep.IsObjectArrayEvent()) { methods = new string[] { "SplitSentenceMethodReturnObjectArray", "SplitSentenceBeanMethodReturnObjectArray", "SplitWordMethodReturnObjectArray" }; } else if (rep.IsMapEvent()) { methods = new string[] { "SplitSentenceMethodReturnMap", "SplitSentenceBeanMethodReturnMap", "SplitWordMethodReturnMap" }; } else if (rep.IsAvroEvent()) { methods = new string[] { "SplitSentenceMethodReturnAvro", "SplitSentenceBeanMethodReturnAvro", "SplitWordMethodReturnAvro" }; } else if (rep.IsJsonEvent() || rep.IsJsonProvidedClassEvent()) { methods = new string[] { "SplitSentenceMethodReturnJson", "SplitSentenceBeanMethodReturnJson", "SplitWordMethodReturnJson" }; } else { throw new IllegalStateException("Unrecognized enum " + rep); } configuration.Compiler.AddPlugInSingleRowFunction( funcs[i] + "_" + rep.GetName(), typeof(EPLContainedEventSplitExpr), methods[i]); } } var config = new ConfigurationCommonEventTypeXMLDOM(); var resourceManager = configuration.ResourceManager; config.SchemaResource = resourceManager.ResolveResourceURL("regression/mediaOrderSchema.xsd").ToString(); config.RootElementName = "MediaOrder"; configuration.Common.AddEventType("MediaOrder", config); configuration.Common.AddEventType("Cancel", config); configuration.Compiler.ByteCode.AllowSubscriber = true; configuration.Compiler.AddPlugInSingleRowFunction( "invalidSentence", typeof(EPLContainedEventSplitExpr), "InvalidSentenceMethod"); configuration.Compiler.AddPlugInSingleRowFunction( "mySplitUDFReturnEventBeanArray", typeof(EPLContainedEventSplitExpr), "MySplitUDFReturnEventBeanArray"); }