org.junit.jupiter.api.Disabled Java Examples
The following examples show how to use
org.junit.jupiter.api.Disabled.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ActivityTest.java From kogito-runtimes with Apache License 2.0 | 6 votes |
@Disabled @Test public void testDMNBusinessRuleTaskInvalidExecution()throws Exception { KieBase kbase = createKnowledgeBaseWithoutDumper( "dmn/BPMN2-BusinessRuleTaskDMNByDecisionName.bpmn2", "dmn/0020-vacation-days.dmn"); ksession = createKnowledgeSession(kbase); Map<String, Object> params = new HashMap<String, Object>(); params.put("age", 16); try { ksession.startProcess("BPMN2-BusinessRuleTask", params); } catch (Exception e) { assertTrue(e instanceof WorkflowRuntimeException); assertTrue(e.getCause() instanceof RuntimeException); assertTrue(e.getCause().getMessage().contains("DMN result errors")); } }
Example #2
Source File: DingTalkNotifierTest.java From jetlinks-community with Apache License 2.0 | 6 votes |
@Test @Disabled void test(){ DingTalkProperties properties=new DingTalkProperties(); properties.setAppKey("appkey"); properties.setAppSecret("appSecuret"); DingTalkMessageTemplate messageTemplate=new DingTalkMessageTemplate(); messageTemplate.setAgentId("335474263"); messageTemplate.setMessage("test"+System.currentTimeMillis()); messageTemplate.setUserIdList("0458215455697857"); DingTalkNotifier notifier=new DingTalkNotifier("test", WebClient.builder().build(),properties,null ); notifier.send(messageTemplate, Values.of(new HashMap<>())) .as(StepVerifier::create) .expectComplete() .verify(); }
Example #3
Source File: StandaloneBPMNProcessTest.java From kogito-runtimes with Apache License 2.0 | 6 votes |
@Test @Disabled("Process does not complete.") public void testAdHocSubProcessAutoComplete() throws Exception { KieBase kbase = createKnowledgeBase("BPMN2-AdHocSubProcessAutoComplete.bpmn2"); KieSession ksession = createKnowledgeSession(kbase); TestWorkItemHandler workItemHandler = new TestWorkItemHandler(); ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler); ProcessInstance processInstance = ksession.startProcess("AdHocSubProcess"); assertThat(processInstance.getState()).isEqualTo(ProcessInstance.STATE_ACTIVE); WorkItem workItem = workItemHandler.getWorkItem(); assertThat(workItem).isNull(); ksession = restoreSession(ksession); ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler); ksession.fireAllRules(); workItem = workItemHandler.getWorkItem(); assertThat(workItem).isNotNull().withFailMessage("WorkItem should not be null."); ksession = restoreSession(ksession); ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler); ksession.getWorkItemManager().completeWorkItem(workItem.getId(), null); assertProcessInstanceCompleted(processInstance.getId(), ksession); }
Example #4
Source File: NashornExecutorTest.java From milkman with MIT License | 6 votes |
@Test @Disabled("no solution yet") void plainGlobalScopeTest() throws URISyntaxException, ScriptException { ScriptEngine engine = new ScriptEngineManager().getEngineByName("nashorn"); Bindings globalBindings = engine.createBindings(); engine.eval("Object.prototype.test = function(arg){print(arg);}", globalBindings); Bindings local = engine.createBindings(); engine.eval("var local = {}", local); //works as expected, printing "hello" engine.getContext().setBindings(globalBindings, ScriptContext.ENGINE_SCOPE); engine.eval("var x = {}; x.test('hello');"); //throws TypeError: null is not a function in <eval> at line number 1 engine.getContext().setBindings(engine.createBindings(), ScriptContext.ENGINE_SCOPE); engine.getContext().setBindings(globalBindings, ScriptContext.GLOBAL_SCOPE); engine.eval("var x = {}; x.test('hello');"); }
Example #5
Source File: IPLookupTest.java From adaptive-radix-tree with MIT License | 6 votes |
@Test @Disabled("too many permuations to go over") public void testLookup() throws IOException { IPLookup ipArt = new IPLookup(() -> new AdaptiveRadixTree<>(InetAddressBinaryComparable.INSTANCE)); IPLookup ipRbt = new IPLookup(() -> new TreeMap<>(InetAddressComparator.INSTANCE)); for (int i = 0; i < 256; i++) { String iaddress = i + "."; for (int j = 0; j < 256; j++) { String jaddress = iaddress + j + "."; for (int k = 0; k < 256; k++) { String kaddress = jaddress + k + "."; for (int l = 0; l < 256; l++) { InetAddress inetAddress = InetAddress.getByName(kaddress + l); assertEquals(ipArt.lookup(inetAddress), ipRbt.lookup(inetAddress)); } } } } }
Example #6
Source File: WeixinCorpNotifierTest.java From jetlinks-community with Apache License 2.0 | 6 votes |
@Test @Disabled void test(){ WechatCorpProperties properties=new WechatCorpProperties(); properties.setCorpId("corpId"); properties.setCorpSecret("corpSecret"); WechatMessageTemplate messageTemplate=new WechatMessageTemplate(); messageTemplate.setAgentId("agentId"); messageTemplate.setMessage("test"+System.currentTimeMillis()); messageTemplate.setToUser("userId"); WeixinCorpNotifier notifier=new WeixinCorpNotifier("test", WebClient.builder().build(),properties,null ); notifier.send(messageTemplate, Values.of(new HashMap<>())) .as(StepVerifier::create) .expectComplete() .verify(); }
Example #7
Source File: IntermediateEventTest.java From kogito-runtimes with Apache License 2.0 | 6 votes |
@Test @Disabled("Transfomer has been disabled") public void testIntermediateCatchEventSignalWithTransformation() throws Exception { KieBase kbase = createKnowledgeBaseWithoutDumper("BPMN2-IntermediateCatchEventSignalWithTransformation.bpmn2"); ksession = createKnowledgeSession(kbase); ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler()); ProcessInstance processInstance = ksession.startProcess("IntermediateCatchEvent"); assertProcessInstanceActive(processInstance); ksession = restoreSession(ksession, true); // now signal process instance ksession.signalEvent("MyMessage", "SomeValue", processInstance.getId()); assertProcessInstanceFinished(processInstance, ksession); assertNodeTriggered(processInstance.getId(), "StartProcess", "UserTask", "EndProcess", "event"); String var = getProcessVarValue(processInstance, "x"); assertThat(var).isNotNull(); assertThat(var).isEqualTo("SOMEVALUE"); }
Example #8
Source File: NugetInspectorParserTest.java From synopsys-detect with Apache License 2.0 | 6 votes |
@Test @Disabled public void createCodeLocationLDService() throws IOException { final String dependencyNodeFile = FunctionalTestFiles.asString("/nuget/LDService_inspection.json"); final ArrayList<String> expectedOutputFiles = new ArrayList<>(); expectedOutputFiles.add("/nuget/LDService_Output_0_graph.json"); expectedOutputFiles.add("/nuget/LDService_Output_1_graph.json"); expectedOutputFiles.add("/nuget/LDService_Output_2_graph.json"); expectedOutputFiles.add("/nuget/LDService_Output_3_graph.json"); expectedOutputFiles.add("/nuget/LDService_Output_4_graph.json"); expectedOutputFiles.add("/nuget/LDService_Output_5_graph.json"); expectedOutputFiles.add("/nuget/LDService_Output_6_graph.json"); expectedOutputFiles.add("/nuget/LDService_Output_7_graph.json"); expectedOutputFiles.add("/nuget/LDService_Output_8_graph.json"); expectedOutputFiles.add("/nuget/LDService_Output_9_graph.json"); expectedOutputFiles.add("/nuget/LDService_Output_10_graph.json"); expectedOutputFiles.add("/nuget/LDService_Output_11_graph.json"); expectedOutputFiles.add("/nuget/LDService_Output_12_graph.json"); createCodeLocation(dependencyNodeFile, expectedOutputFiles); }
Example #9
Source File: IntermediateEventTest.java From kogito-runtimes with Apache License 2.0 | 6 votes |
@Test @Disabled("Transfomer has been disabled") public void testEventSubprocessSignalWithTransformation() throws Exception { KieBase kbase = createKnowledgeBaseWithoutDumper("BPMN2-EventSubprocessSignalWithTransformation.bpmn2"); ksession = createKnowledgeSession(kbase); TestWorkItemHandler workItemHandler = new TestWorkItemHandler(); ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler); ProcessInstance processInstance = ksession .startProcess("BPMN2-EventSubprocessSignal"); assertProcessInstanceActive(processInstance); ksession = restoreSession(ksession, true); ksession.signalEvent("MySignal", "john", processInstance.getId()); assertProcessInstanceFinished(processInstance, ksession); assertNodeTriggered(processInstance.getId(), "start", "User Task 1", "Sub Process 1", "start-sub", "end-sub"); String var = getProcessVarValue(processInstance, "x"); assertThat(var).isNotNull(); assertThat(var).isEqualTo("JOHN"); }
Example #10
Source File: CompensationTest.java From kogito-runtimes with Apache License 2.0 | 6 votes |
@Test @Disabled public void compensationViaCancellation() throws Exception { KieSession ksession = createKnowledgeSession("compensation/BPMN2-Compensation-IntermediateThrowEvent.bpmn2"); TestWorkItemHandler workItemHandler = new TestWorkItemHandler(); ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler); Map<String, Object> params = new HashMap<String, Object>(); params.put("x", "0"); ProcessInstance processInstance = ksession.startProcess("CompensateIntermediateThrowEvent", params); ksession.signalEvent("Cancel", null, processInstance.getId()); ksession.getWorkItemManager().completeWorkItem(workItemHandler.getWorkItem().getId(), null); // compensation activity (assoc. with script task) signaled *after* script task assertProcessInstanceCompleted(processInstance.getId(), ksession); assertProcessVarValue(processInstance, "x", "1"); }
Example #11
Source File: StandaloneBPMNProcessTest.java From kogito-runtimes with Apache License 2.0 | 6 votes |
@Test @Disabled("Process does not complete.") public void testAdHocSubProcess() throws Exception { KieBase kbase = createKnowledgeBase("BPMN2-AdHocSubProcess.bpmn2"); KieSession ksession = createKnowledgeSession(kbase); TestWorkItemHandler workItemHandler = new TestWorkItemHandler(); ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler); ProcessInstance processInstance = ksession.startProcess("AdHocSubProcess"); assertThat(processInstance.getState()).isEqualTo(ProcessInstance.STATE_ACTIVE); WorkItem workItem = workItemHandler.getWorkItem(); assertThat(workItem).isNull(); ksession = restoreSession(ksession); ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler); ksession.fireAllRules(); ksession.signalEvent("Hello2", null, processInstance.getId()); workItem = workItemHandler.getWorkItem(); assertThat(workItem).isNotNull(); ksession = restoreSession(ksession); ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler); ksession.getWorkItemManager().completeWorkItem(workItem.getId(), null); assertProcessInstanceCompleted(processInstance.getId(), ksession); }
Example #12
Source File: IntermediateEventTest.java From kogito-runtimes with Apache License 2.0 | 6 votes |
@Test @Disabled("Transfomer has been disabled") public void testMessageIntermediateThrowWithTransformation() throws Exception { KieBase kbase = createKnowledgeBaseWithoutDumper("BPMN2-IntermediateThrowEventMessageWithTransformation.bpmn2"); ksession = createKnowledgeSession(kbase); final StringBuffer messageContent = new StringBuffer(); ksession.getWorkItemManager().registerWorkItemHandler("Send Task", new SendTaskHandler(){ @Override public void executeWorkItem(WorkItem workItem, WorkItemManager manager) { // collect message content for verification messageContent.append(workItem.getParameter("Message")); super.executeWorkItem(workItem, manager); } }); Map<String, Object> params = new HashMap<String, Object>(); params.put("x", "MyValue"); ProcessInstance processInstance = ksession.startProcess( "MessageIntermediateEvent", params); assertProcessInstanceCompleted(processInstance); assertThat(messageContent.toString()).isEqualTo("MYVALUE"); }
Example #13
Source File: OutOfMemoryTest.java From kogito-runtimes with Apache License 2.0 | 6 votes |
/** * This test can take a while (> 1 minute). * @throws Exception */ @Test @Disabled public void testStatefulSessionsCreation() throws Exception { KieBase kbase = loadKnowledgeBase("test_OutOfMemoryError.drl"); int i = 0; SessionConfiguration conf = SessionConfiguration.newInstance(); conf.setKeepReference( true ); // this is just for documentation purposes, since the default value is "true" try { for ( i = 0; i < 300000; i++ ) { KieSession ksession = kbase.newKieSession( conf, null ); ksession.dispose(); } } catch ( Throwable e ) { logger.info( "Error at: " + i ); e.printStackTrace(); fail( "Should not raise any error or exception." ); } }
Example #14
Source File: InviteTest.java From incubator-tuweni with Apache License 2.0 | 6 votes |
/** * Tests that it is possible to generate a test invite code. * * @throws IOException * @throws InterruptedException */ @Test @Disabled("Requires a running ssb server") public void testGenerateInvite() throws IOException, InterruptedException { TestConfig config = TestConfig.fromEnvironment(); AsyncResult<ScuttlebuttClient> client = ScuttlebuttClientFactory.fromNet(new ObjectMapper(), config.getHost(), config.getPort(), config.getKeyPair()); ScuttlebuttClient scuttlebuttClient = client.get(); AsyncResult<Invite> inviteAsyncResult = scuttlebuttClient.getNetworkService().generateInviteCode(1); Invite invite = inviteAsyncResult.get(); assertEquals(invite.identity().publicKeyAsBase64String(), config.getKeyPair().publicKey().bytes().toBase64String()); }
Example #15
Source File: IntermediateEventTest.java From kogito-runtimes with Apache License 2.0 | 6 votes |
@Test @Disabled("Transfomer has been disabled") public void testIntermediateCatchEventMessageWithTransformation() throws Exception { KieBase kbase = createKnowledgeBaseWithoutDumper("BPMN2-IntermediateCatchEventMessageWithTransformation.bpmn2"); ksession = createKnowledgeSession(kbase); ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler()); ProcessInstance processInstance = ksession.startProcess("IntermediateCatchEvent"); assertProcessInstanceActive(processInstance); ksession = restoreSession(ksession, true); // now signal process instance ksession.signalEvent("Message-HelloMessage", "SomeValue", processInstance.getId()); assertProcessInstanceFinished(processInstance, ksession); String var = getProcessVarValue(processInstance, "x"); assertThat(var).isNotNull(); assertThat(var).isEqualTo("SOMEVALUE"); }
Example #16
Source File: DRLIncompleteCodeTest.java From kogito-runtimes with Apache License 2.0 | 6 votes |
@Test @Disabled public void testIncompleteCode1() throws DroolsParserException, RecognitionException { String input = "package a.b.c import a.b.c.* rule MyRule when Class ( property memberOf collexction "; DrlParser parser = new DrlParser(LanguageLevelOption.DRL5); PackageDescr descr = parser.parse(true, input); System.out.println(parser.getErrors()); assertNotNull(descr); assertEquals("a.b.c", descr.getNamespace()); assertEquals("a.b.c.*", descr.getImports().get(0) .getTarget()); assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_END, getLastIntegerValue(parser.getEditorSentences().get(2) .getContent())); }
Example #17
Source File: DRLIncompleteCodeTest.java From kogito-runtimes with Apache License 2.0 | 6 votes |
@Test @Disabled public void testIncompleteCode9() throws DroolsParserException, RecognitionException { String input = "package a.b.c import a.b.c.*" + " rule MyRule xxxxx Class ( property memberOf collection ) then end " + " query MyQuery Class ( property memberOf collection ) end "; DrlParser parser = new DrlParser(LanguageLevelOption.DRL5); PackageDescr descr = parser.parse(true, input); assertEquals("a.b.c", descr.getNamespace()); assertEquals("a.b.c.*", descr.getImports().get(0) .getTarget()); assertEquals(1, descr.getRules().size()); assertEquals("MyQuery", descr.getRules().get(0).getName()); }
Example #18
Source File: StartEventTest.java From kogito-runtimes with Apache License 2.0 | 6 votes |
@Test @Timeout(10) @Disabled("Transfomer has been disabled") public void testSignalStartWithTransformation() throws Exception { NodeLeftCountDownProcessEventListener countDownListener = new NodeLeftCountDownProcessEventListener("StartProcess", 1); KieBase kbase = createKnowledgeBaseWithoutDumper("BPMN2-SignalStartWithTransformation.bpmn2"); ksession = createKnowledgeSession(kbase); ksession.addEventListener(countDownListener); final List<ProcessInstance> list = new ArrayList<ProcessInstance>(); ksession.addEventListener(new DefaultProcessEventListener() { public void beforeProcessStarted(ProcessStartedEvent event) { list.add(event.getProcessInstance()); } }); ksession.signalEvent("MySignal", "NewValue"); countDownListener.waitTillCompleted(); assertThat(getNumberOfProcessInstances("Minimal")).isEqualTo(1); assertThat(list).isNotNull(); assertThat(list.size()).isEqualTo(1); String var = getProcessVarValue(list.get(0), "x"); assertThat(var).isEqualTo("NEWVALUE"); }
Example #19
Source File: DRLContextTest.java From kogito-runtimes with Apache License 2.0 | 6 votes |
@Test @Disabled public void testCheckLHSLocationDetermination_INSIDE_CONDITION_END3() { // FIXME for now it will be a limitation of the parser... memberOf is a // soft-keyword and this sentence cannot be parsed correctly if // misspelling String input = "rule MyRule \n" + " when \n" + " Class ( property memberOf collection "; DRLParser parser = getParser(input); parser.enableEditorInterface(); try { parser.compilationUnit(); } catch (Exception ex) { } assertEquals(Location.LOCATION_LHS_INSIDE_CONDITION_END, getLastIntegerValue(parser.getEditorInterface().get(0) .getContent())); }
Example #20
Source File: EscalationEventTest.java From kogito-runtimes with Apache License 2.0 | 5 votes |
@Test @Disabled("Non interrupting escalation has not yet been implemented.") // TODO: implement non-interrupting escalation public void testNonInterruptingEscalationBoundaryEventOnTask() throws Exception { KieBase kbase = createKnowledgeBase("escalation/BPMN2-EscalationBoundaryEventOnTask.bpmn2"); ksession = createKnowledgeSession(kbase); TestWorkItemHandler handler = new TestWorkItemHandler(); ksession.getWorkItemManager().registerWorkItemHandler("Human Task", handler); ksession.addEventListener(LOGGING_EVENT_LISTENER); ProcessInstance processInstance = ksession.startProcess("non-interrupting-escalation"); List<WorkItem> workItems = handler.getWorkItems(); assertEquals(2, workItems.size()); WorkItem johnsWork = workItems.get(0); WorkItem marysWork = workItems.get(1); if (!"john".equalsIgnoreCase((String) johnsWork.getParameter("ActorId"))) { marysWork = johnsWork; johnsWork = workItems.get(1); } // end event after task triggers escalation ksession.getWorkItemManager().completeWorkItem(johnsWork.getId(), null); // escalation should have run.. // should finish process ksession.getWorkItemManager().completeWorkItem(marysWork.getId(), null); assertProcessInstanceCompleted(processInstance); }
Example #21
Source File: DSLMappingFileTest.java From kogito-runtimes with Apache License 2.0 | 5 votes |
@Test @Disabled public void testParseFileWithEscaptedEquals() { String file = "[when][]something:\\={value}=Attribute( something == \"{value}\" )"; try { final Reader reader = new StringReader( file ); this.file = new DSLTokenizedMappingFile(); final boolean parsingResult = this.file.parseAndLoad( reader ); reader.close(); assertTrue(parsingResult, this.file.getErrors().toString()); assertTrue( this.file.getErrors().isEmpty() ); assertEquals( 1, this.file.getMapping().getEntries().size() ); DSLMappingEntry entry = (DSLMappingEntry) this.file.getMapping().getEntries().get( 0 ); assertEquals( DSLMappingEntry.CONDITION, entry.getSection() ); assertEquals( DSLMappingEntry.EMPTY_METADATA, entry.getMetaData() ); assertEquals( "something:={value}", entry.getMappingKey() ); assertEquals( "Attribute( something == \"{value}\" )", entry.getMappingValue() ); } catch ( final IOException e ) { e.printStackTrace(); fail( "Should not raise exception " ); } }
Example #22
Source File: ProcessFlowControlTest.java From kogito-runtimes with Apache License 2.0 | 5 votes |
@Test @Disabled public void FIXME_testLoadingRuleFlowInPackage4() throws Exception { // adding ruleflows of different package builder.addRuleFlow( new InputStreamReader( getClass().getResourceAsStream( "empty_ruleflow.rfm" ) ) ); try { builder.addRuleFlow( new InputStreamReader( getClass().getResourceAsStream( "ruleflow.rfm" ) ) ); throw new Exception( "An exception should have been thrown." ); } catch ( PackageMergeException e ) { // do nothing } }
Example #23
Source File: DslTest.java From kogito-runtimes with Apache License 2.0 | 5 votes |
@Test @Disabled("antlr cannot parse correctly if the file ends with a comment without a further line break") public void testEmptyDSL() throws Exception { // FIXME etirelli / mic_hat not sure what to do with this? final String DSL = "# This is an empty dsl file."; // gives antlr <EOF> error KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add( ResourceFactory.newClassPathResource( "test_expander.dsl", getClass() ), ResourceType.DSL ); kbuilder.add( ResourceFactory.newReaderResource( new StringReader( DSL) ) , ResourceType.DSLR ); assertFalse( kbuilder.hasErrors() ); // trying to expand Cheese() pattern // Check errors final String err = kbuilder.getErrors().toString(); assertEquals( "", err ); assertEquals( 0, kbuilder.getErrors().size() ); // the compiled package Collection<KiePackage> pkgs = kbuilder.getKnowledgePackages(); assertEquals( 0, pkgs.size() ); InternalKnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); kbase.addPackages( pkgs ); kbase = SerializationHelper.serializeObject(kbase); KieSession session = createKnowledgeSession(kbase); pkgs = SerializationHelper.serializeObject(pkgs); assertNull( pkgs ); }
Example #24
Source File: OutOfMemoryTest.java From kogito-runtimes with Apache License 2.0 | 5 votes |
@Test @Disabled public void testAgendaLoop() throws Exception { KieBase kbase = loadKnowledgeBase("test_OutOfMemory.drl"); KieSession ksession = kbase.newKieSession(); ksession.insert( new Cheese( "stilton", 1 ) ); ksession.fireAllRules( 3000000 ); // just for profiling //Thread.currentThread().wait(); }
Example #25
Source File: SpannerTestKit.java From cloud-spanner-r2dbc with Apache License 2.0 | 5 votes |
@Override @Disabled @Test public void savePoint() { /* Save points are not supported. */ }
Example #26
Source File: NugetInspectorParserTest.java From synopsys-detect with Apache License 2.0 | 5 votes |
@Test @Disabled public void createCodeLocationLDServiceDashboard() throws IOException { final String dependencyNodeFile = FunctionalTestFiles.asString("/nuget/LDService.Dashboard_inspection.json"); final ArrayList<String> expectedOutputFiles = new ArrayList<>(); expectedOutputFiles.add("/nuget/LDService.Dashboard_Output_0_graph.json"); createCodeLocation(dependencyNodeFile, expectedOutputFiles); }
Example #27
Source File: SpannerTestKit.java From cloud-spanner-r2dbc with Apache License 2.0 | 5 votes |
@Override @Disabled @Test public void compoundStatement() { /* Compound statements (statements with more than 1 semi-colon) are not supported. */ }
Example #28
Source File: SpannerTestKit.java From cloud-spanner-r2dbc with Apache License 2.0 | 5 votes |
@Override @Disabled @Test public void prepareStatementWithIncompleteBindingFails() { /* We do not currently do client-side verification of bindings: https://github.com/GoogleCloudPlatform/cloud-spanner-r2dbc/issues/74 */ }
Example #29
Source File: RBTreeTest.java From kogito-runtimes with Apache License 2.0 | 5 votes |
@Test @Disabled public void testLargeData() { int range = 6000000; for ( int i = 0; i < 10; i++ ) { // produces duplicate entry, isolated in test1 long startTime = System.currentTimeMillis(); generateAndTest( 90000, range-90000, range, 1 ); long endTime = System.currentTimeMillis(); System.out.println( endTime - startTime ); } }
Example #30
Source File: KnowledgeBuilderTest.java From kogito-runtimes with Apache License 2.0 | 5 votes |
@Test @Disabled // TODO we now allow bindings on declarations, so update the test for this public void testDuplicateDeclaration() { final KnowledgeBuilderImpl builder = new KnowledgeBuilderImpl(); final PackageDescr packageDescr = new PackageDescr( "p1" ); final RuleDescr ruleDescr = new RuleDescr( "rule-1" ); packageDescr.addRule( ruleDescr ); final AndDescr lhs = new AndDescr(); ruleDescr.setLhs( lhs ); final PatternDescr pattern1 = new PatternDescr( Cheese.class.getName() ); lhs.addDescr( pattern1 ); final BindingDescr fieldBindingDescr = new BindingDescr( "$type", "type" ); final FieldConstraintDescr literalDescr = new FieldConstraintDescr( "type" ); literalDescr.addRestriction( new LiteralRestrictionDescr( "==", "stilton" ) ); pattern1.addConstraint( fieldBindingDescr ); pattern1.addConstraint( literalDescr ); final PatternDescr pattern2 = new PatternDescr( Cheese.class.getName() ); lhs.addDescr( pattern2 ); pattern2.addConstraint( fieldBindingDescr ); ruleDescr.setConsequence( "update(stilton);" ); builder.addPackage( packageDescr ); assertThat((Object[]) builder.getErrors().getErrors()).hasSize(2); }