Skip to content

Commit

Permalink
kie-issues#1601: removing binary files and disabling tests associated…
Browse files Browse the repository at this point in the history
… with those (#6141)
  • Loading branch information
porcelli authored Nov 3, 2024
1 parent b880a9b commit 4afd234
Show file tree
Hide file tree
Showing 29 changed files with 27 additions and 1 deletion.
Binary file not shown.
Binary file removed drools-compiler/src/test/resources/KAModelTest.jar
Binary file not shown.
Binary file not shown.
Binary file removed drools-compiler/src/test/resources/primespoc.jar
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@ private void unsetPrivateKeyProperties() {
* In this case we are dealing with facts which are not on the systems classpath.
*/
@Test
@Ignore ("ignored due use of binary resource, which is not allowed in Apache source release.")
public void testSerializabilityWithJarFacts() throws Exception {
MapBackedClassLoader loader = new MapBackedClassLoader( this.getClass().getClassLoader() );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,7 @@ public void testDynamicRuleAdditionsWithEntryPoints() throws Exception {
}

@Test(timeout=10000)
@Ignore ("ignored due use of binary resource, which is not allowed in Apache source release.")
public void testIsolatedClassLoaderWithEnumsPkgBuilder() throws Exception {
try {
// Creates first class loader and use it to load fact classes
Expand Down Expand Up @@ -948,6 +949,7 @@ public void testIsolatedClassLoaderWithEnumsPkgBuilder() throws Exception {
}

@Test(timeout=10000)
@Ignore ("ignored due use of binary resource, which is not allowed in Apache source release.")
public void testIsolatedClassLoaderWithEnumsContextClassloader() throws Exception {
try {
// Creates first class loader and use it to load fact classes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.drools.testcoverage.common.util.KieBaseUtil;
import org.drools.testcoverage.common.util.KieUtil;
import org.drools.testcoverage.common.util.TestParametersUtil;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
Expand Down Expand Up @@ -313,6 +314,7 @@ public void testJBRULES3326() throws Exception {
}

@Test
@Ignore ("ignored due use of binary resource, which is not allowed in Apache source release.")
public void testGUVNOR578_2() throws Exception {
// An internal specific test case so not enhanced for executable-model
final MapBackedClassLoader loader = new MapBackedClassLoader( this.getClass().getClassLoader() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.net.URL;
import java.net.URLClassLoader;

import org.junit.Ignore;
import org.junit.Test;
import org.kie.api.KieServices;
import org.kie.api.builder.KieModule;
Expand All @@ -29,6 +30,7 @@

import static org.assertj.core.api.Assertions.assertThat;

@Ignore("ignored due use of binary resource, which is not allowed in Apache source release.")
public class KieRepositoryTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.drools.testcoverage.common.util.TestParametersUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
Expand Down Expand Up @@ -529,6 +530,7 @@ private void checkAgendaTotals(GenericKieSessionMonitoringMXBean mb, long mCreat
* Copied from KieRepositoryTest to test JMX monitoring
*/
@Test
@Ignore("ignored due use of binary resource, which is not allowed in Apache source release.")
public void testLoadKjarFromClasspath() {
// DROOLS-1335
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6993,6 +6993,7 @@ public void testJittedConstraintStringAndLong() {
}

@Test
@Ignore ("ignored due use of binary resource, which is not allowed in Apache source release.")
public void testKieBuilderWithClassLoader() {
// DROOLS-763
String drl =
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.drools.verifier.data.VerifierReport;
import org.drools.verifier.report.components.Severity;
import org.drools.verifier.report.components.VerifierMessageBase;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.kie.api.io.ResourceType;

Expand Down Expand Up @@ -69,6 +70,7 @@ void testVerifier() {
}

@Test
@Disabled("disabled due use of binary resource, which is not allowed in Apache source release.")
void testFactTypesFromJar() {
VerifierBuilder vBuilder = VerifierBuilderFactory.newVerifierBuilder();

Expand Down Expand Up @@ -114,6 +116,7 @@ void testFactTypesFromJar() {
}

@Test
@Disabled("disabled due use of binary resource, which is not allowed in Apache source release.")
void testFactTypesFromJarAndDeclarations() {
VerifierBuilder vBuilder = VerifierBuilderFactory.newVerifierBuilder();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@
import org.drools.verifier.Verifier;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;


@Disabled("disabled due use of binary resource, which is not allowed in Apache source release.")
public class PackageHeaderLoaderTest {

private ArrayList<JarInputStream> jarInputStreams;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.jar.JarInputStream;

import org.drools.verifier.Verifier;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;
Expand All @@ -33,6 +34,7 @@
public class VerifierMapBackedClassLoaderTest {

@Test
@Disabled("disabled due use of binary resource, which is not allowed in Apache source release.")
void testCheckResources() throws Exception {
ArrayList<JarInputStream> jarInputStreams = new ArrayList<JarInputStream>();
jarInputStreams.add(new JarInputStream(Verifier.class.getResourceAsStream("model.jar")));
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.net.URL;
import java.util.Optional;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.kie.efesto.common.api.io.MemoryFile;

Expand Down Expand Up @@ -57,6 +58,7 @@ void getFileFromFileNameOrFilePathNotExisting() {
}

@Test
@Disabled("disabled due use of binary resource, which is not allowed in Apache source release.")
void getFileFromURL() throws IOException {
URL url = getJarUrl();
assertThat(url).isNotNull();
Expand All @@ -74,6 +76,7 @@ void getFileFromURL() throws IOException {
}

@Test
@Disabled("disabled due use of binary resource, which is not allowed in Apache source release.")
void getOptionalFileFromJar() throws IOException {
URL jarUrl = getJarUrl();
assertThat(jarUrl).isNotNull();
Expand Down Expand Up @@ -111,6 +114,7 @@ void getFileFromResource() throws IOException {
}

@Test
@Disabled("disabled due use of binary resource, which is not allowed in Apache source release.")
void getFileFromJar() throws URISyntaxException, IOException {
URL jarUrl = getJarUrl();
assertThat(jarUrl).isNotNull();
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.Optional;

import com.fasterxml.jackson.core.JsonProcessingException;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.kie.efesto.common.api.identifiers.LocalUri;
import org.kie.efesto.common.api.identifiers.ModelLocalUriId;
Expand Down Expand Up @@ -153,6 +154,7 @@ void getGeneratedResourcesObjectFromFile() throws Exception {
}

@Test
@Disabled("disabled due use of binary resource, which is not allowed in Apache source release.")
void getGeneratedResourcesObjectFromJar() throws Exception {
ClassLoader originalClassLoader = addJarToClassLoader();
Optional<File> optionalIndexFile = getFileFromFileName("IndexFile.testb_json");
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.net.URLClassLoader;
import java.util.Optional;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.kie.efesto.common.api.identifiers.LocalUri;
import org.kie.efesto.common.api.identifiers.ModelLocalUriId;
Expand Down Expand Up @@ -58,6 +59,7 @@ void getGeneratedRedirectResourceFromFile() {
}

@Test
@Disabled("disabled due use of binary resource, which is not allowed in Apache source release.")
void getGeneratedRedirectResourceFromJar() {
ClassLoader originalClassLoader = addJarToClassLoader();
ModelLocalUriId modelLocalUriId = new ModelLocalUriId(LocalUri.parse("/testb/redirecttestmod"));
Expand Down
Binary file not shown.
2 changes: 2 additions & 0 deletions kie-ci/src/test/java/org/kie/scanner/KieModuleMavenTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.drools.base.factmodel.ClassDefinition;
import org.drools.base.factmodel.FieldDefinition;
import org.drools.mvel.asm.DefaultBeanClassBuilder;
import org.junit.Ignore;
import org.junit.Test;
import org.kie.api.KieBase;
import org.kie.api.KieServices;
Expand Down Expand Up @@ -212,6 +213,7 @@ public void testKieModulePojoDependencies() throws Exception {
}

@Test
@Ignore ("ignored due use of binary resource, which is not allowed in Apache source release.")
public void testKieContainerBeforeAndAfterDeployOfSnapshot() throws Exception {
// BZ-1007977
KieServices ks = KieServices.Factory.get();
Expand Down
Binary file removed kie-ci/src/test/resources/kjar/kjar-module-after.jar
Binary file not shown.
Binary file not shown.

0 comments on commit 4afd234

Please sign in to comment.