Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kie-issues-1241 - moving integration tests that depend on published image to -apps - so it can work with local build. #2058

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

# KOGITO-4499 Hot reload false negative instrumentation for DecisionModels

The DecisionModels is meant to be reloaded, but it would seems that for some reasons the quarkus dev mode hotreload instrumentation thinks the class is equivalent hence not reloaded.

The problem can be reproduced only using DevMojo maven invoker style, not with ShrinkWrap.

This is a simple module which would test maven invoker style per the linked DevMojoIT, as suggested here https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/Failed.20to.20replace.20classes.20via.20instrumentation/near/225045416

The second change of the .dmn resource fails, and I believe this might be a good demonstration of how the Kogito hot reload is currently broken.

The test prepares a basic Kogito-on-Quarkus maven app with a simple DMN, containing a decision which prefix "Hello, " the name given in input.
The first http call works as expected, the returned value is "Hello, v1".
The test then mutates the content of the dmn, now the decision should prefix "Ciao, ".
This second http call works again as expected, the returned value is "Ciao, v1".
The test then mutates again the content of the dmn, now it is expecting to prefix "Bonjour, ".
As can be seen in the log, attached, this fails, since the Ciao-prefix is still occuring.
build-project-intrumentation-reload-dmn.log

This module and test demonstrate the fix for KOGITO-4499.
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.kie.kogito</groupId>
<artifactId>apps-integration-tests</artifactId>
<version>999-SNAPSHOT</version>
</parent>

<artifactId>jbpm-sith-drools-quarkus-integration-test-maven-devmode</artifactId>
<name>jBPM with Drools :: Quarkus Extension :: Integration Tests (Maven devmode)</name>

<properties>
<data-index-ephemeral.image>org.kie.kogito/data-index-service-inmemory:${project.version}</data-index-ephemeral.image>
<!-- excluded because of https://issues.redhat.com/browse/KOGITO-5656 -->
<quarkus.test.list.include>false</quarkus.test.list.include>
<java.module.name>io.quarkus.it.kogito.devmode</java.module.name>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-quarkus-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>

<!-- this is used implicitly by hot reload tests so let's make Maven aware of it -->
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-with-drools-quarkus-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-with-drools-quarkus</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-jackson</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-test-utils</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-test-maven</artifactId>
<version>${version.io.quarkus.quarkus-test}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.stephenc.jcip</groupId>
<artifactId>jcip-annotations</artifactId>
<version>${version.com.github.stephenc.jcip}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables combine.children="append">
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Loading
Loading