Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* [Fix apache/incubator-kie-issues#987] Fix nightly

* Import not sorted preventing green
  • Loading branch information
fjtirado authored and rgdoliveira committed Mar 11, 2024
1 parent dfd83f3 commit 638ab98
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ private void intercept(UserTaskEvent event) {

@Override
public void beforeProcessStarted(ProcessStartedEvent event) {
intercept(event);
}

@Override
public void afterProcessStarted(ProcessStartedEvent event) {
intercept(event);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private Optional<UserTaskInstanceStateDataEvent> findUserTaskInstanceEvent(List<
}

private Optional<DataEvent<?>> findProcessInstanceEvent(List<DataEvent<?>> events, int state) {
return events.stream().filter(ProcessInstanceStateDataEvent.class::isInstance).filter(e -> ((ProcessInstanceStateEventBody) e.getData()).getState() == state).findAny();
return events.stream().filter(ProcessInstanceStateDataEvent.class::isInstance).filter(e -> ((ProcessInstanceStateEventBody) e.getData()).getEventType() == state).findAny();
}

private List<ProcessInstanceNodeEventBody> findNodeInstanceEvents(List<DataEvent<?>> events, int eventType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ void testWorkflowEvents() throws Exception {
Map data = (Map) event.getData();
if ("secure".equals(data.get("processId"))) {
if (event.getType().equals("ProcessInstanceStateDataEvent")) {
assertEquals("ProcessInstanceStateEvent", event.getType());
assertEquals("/secure", event.getSource().toString());
assertEquals("secure", event.getKogitoProcessId());
assertEquals("1.0", event.getKogitoProcessInstanceVersion());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@

import java.net.URL;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

import io.quarkus.test.common.http.TestHTTPResource;
import io.quarkus.test.junit.QuarkusIntegrationTest;
import io.restassured.RestAssured;
Expand All @@ -28,9 +32,6 @@
import io.swagger.v3.parser.OpenAPIV3Parser;
import io.swagger.v3.parser.core.models.ParseOptions;
import io.swagger.v3.parser.core.models.SwaggerParseResult;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;

import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.Matchers.aMapWithSize;
Expand Down

0 comments on commit 638ab98

Please sign in to comment.