This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"body":"**Is your feature request related to a problem? Please describe.**\r\nIn the [first implementation of model registry and serving implemention](https://github.com/opendatahub-io/model-registry/issues/173) we focused on creating unit testing by mocking the model registry service because the TestContainer approach was not feasible as it would not work in `openshift-ci` environment [1]. On the other hand having some ITs where we can actually test the connection to an existing model registry/ml-metadata service could be very helpful and furthermore we could setup real use cases in these tests.\r\n\r\n[1] https://cloud.redhat.com/blog/running-testcontainers-in-openshift-pipelines-with-docker-in-docker\r\n\r\n**Describe the solution you'd like**\r\nSetup `e2e` test suite in `odh-model-controller` where we could setup model-registry service by directly applying a `deployment` and then run all expected tests.\r\n\r\n**Describe alternatives you've considered**\r\nKeep just unit tests, unfortunately we these |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package closureforloop | |
import ( | |
"strings" | |
"testing" | |
) | |
// exercising on: https://go.dev/blog/loopvar-preview | |
func TestHappens(t *testing.T) { | |
tt := []struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Collect all the commits since the current date | |
commits=$(git rev-list --since="1 year ago" --date=iso main) | |
# Set the global counter to 0 | |
counter=0 | |
# Iterate over the commits | |
for commit in $commits; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_62FDAF3C-1F2E-41F3-A7DB-1D567C44A8F9" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="_1490CCCD-DDAD-4B45-BB0B-B6D8E94F79D0" name="so69764028" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_62FDAF3C-1F2E-41F3-A7DB-1D567C44A8F9"> | |
<dmn:extensionElements/> | |
<dmn:inputData id="_A8A0C2DA-7024-48B9-9578-91A6CEAF3824" name="claim amount"> | |
<dmn:extensionElements/> | |
<dmn:variable id="_67061314-D52B-4D87-AF3A-2AB1F3ADA3D4" name="claim amount" typeRef="number"/> | |
</dmn:inputData> | |
<dmn:decision id="_263E9B6F-FD11-4087-A671-7E1FB1E97232" name="hradmin approval"> | |
<dmn:extensionElements/> | |
<dmn:variable id="_890ED741-6BA6-4991-8037-C43A3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo usermod -a -G tty <MYUSER> | |
sudo usermod -a -G dialout <MYUSER> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@FEELType private class DROOLS_1775_1 {} | |
@FEELType private class DROOLS_1775_2 {} | |
@FEELType private class DROOLS_1775_3 {} | |
@FEELType private class DROOLS_1775_4 {} | |
@FEELType private class DROOLS_1775_5 {} | |
@FEELType private class DROOLS_1775_6 {} | |
@FEELType private class DROOLS_1775_7 {} | |
@FEELType private class DROOLS_1775_8 {} | |
@FEELType private class DROOLS_1775_11 {} | |
@FEELType private class DROOLS_1775_12 {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52 unmarshal = | |
org.drools.workbench.models.guided.dtable.backend.GuidedDTXMLPersistence.getInstance().unmarshal( | |
new String(Files.readAllBytes(Paths.get("src/main/resources/guidedTable.gdst"))) | |
); | |
String drl = org.drools.workbench.models.guided.dtable.backend.GuidedDTDRLPersistence.getInstance().marshal(unmarshal); | |
System.out.println(drl); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KieSession kieSessionHelper = new KieHelper() | |
.addContent(new String(Files.readAllBytes(Paths.get("src/main/resources/myRules.drl"))), ResourceType.DRL) | |
.build().newKieSession(); | |
ReteDumper.dumpRete(kieSessionHelper); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.drools.persistence.monitoring; | |
import org.drools.compiler.Person; | |
import org.drools.core.SessionConfiguration; | |
import org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession; | |
import org.drools.core.command.impl.FireAllRulesInterceptor; | |
import org.drools.core.command.impl.LoggingInterceptor; | |
import org.drools.core.factmodel.traits.Traitable; | |
import org.drools.core.management.DroolsManagementAgent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testMATTEO() throws InterruptedException { | |
ReleaseId releaseId = ks.newReleaseId("org.kie", "test-delete", "1.0.0"); | |
createAndDeployJar( ks, releaseId, createDRL("ruleA") ); | |
ExecutorService es = Executors.newFixedThreadPool(10); | |
List<Callable<Boolean>> list = new ArrayList<Callable<Boolean>>(); | |
for (int i = 0; i < 6; i++) { | |
list.add(new Callable<Boolean>() { | |
@Override |
NewerOlder