Skip to content

Commit

Permalink
KOGITO-480 - Upgrade to Quarkus 0.27.0 (apache#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianonicolai committed Oct 31, 2019
1 parent 9e18419 commit b1e469c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 42 deletions.
12 changes: 0 additions & 12 deletions data-index/data-index-service/pom.xml
Expand Up @@ -10,18 +10,6 @@
<artifactId>data-index-service</artifactId>
<name>Kogito :: Data Index Service</name>

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

<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
Expand Down
Expand Up @@ -16,8 +16,6 @@

package org.kie.kogito.index.vertx;

import java.util.concurrent.atomic.AtomicBoolean;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
Expand All @@ -39,17 +37,13 @@ public class VertxRouterSetup {
@Inject
GraphQL graphQL;

private AtomicBoolean routesAdded = new AtomicBoolean(false);

void setupRouter(@Observes Router router) {
if (!routesAdded.get()) {
router.route("/graphql").handler(ApolloWSHandler.create(graphQL));
router.route("/graphql").handler(GraphQLHandler.create(graphQL, new GraphQLHandlerOptions()));
router.route("/graphiql/*").handler(GraphiQLHandler.create(new GraphiQLHandlerOptions().setEnabled(true)));
router.route("/").handler(ctx -> ctx.reroute("/graphiql"));
router.route().handler(LoggerHandler.create());
router.route().handler(StaticHandler.create());
router.route().handler(FaviconHandler.create());
}
router.route("/graphql").handler(ApolloWSHandler.create(graphQL));
router.route("/graphql").handler(GraphQLHandler.create(graphQL, new GraphQLHandlerOptions()));
router.route("/graphiql/*").handler(GraphiQLHandler.create(new GraphiQLHandlerOptions().setEnabled(true)));
router.route("/").handler(ctx -> ctx.reroute("/graphiql"));
router.route().handler(LoggerHandler.create());
router.route().handler(StaticHandler.create());
router.route().handler(FaviconHandler.create());
}
}
Expand Up @@ -12,18 +12,6 @@
<artifactId>data-index-storage-infinispan</artifactId>
<name>Kogito :: Data Index Storage Infinispan</name>

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

<dependencies>
<dependency>
<groupId>org.kie.kogito</groupId>
Expand Down
Expand Up @@ -111,7 +111,7 @@ public void isOkayToReinsertSameTypeThenQuery(final ClassAwareObjectStore underT

@ClassAwareObjectStoreParameterizedTest
public void onceSuperClassIsSetUpForReadingItCanBecomeSetUpForWritingWithoutGettingDuplicateQueryReturns(final ClassAwareObjectStore underTest) throws Exception {
assertThat(underTest.iterateObjects(SuperClass.class)).isEmpty();
assertThat(collect(underTest.iterateObjects(SuperClass.class))).isEmpty();

insertObjectWithFactHandle(underTest, new SubClass());
insertObjectWithFactHandle(underTest, new SuperClass());
Expand All @@ -127,11 +127,11 @@ public void onceSuperClassIsSetUpForReadingItCanBecomeSetUpForWritingWithoutGett
@ClassAwareObjectStoreParameterizedTest
public void clearRemovesInsertedObjects(final ClassAwareObjectStore underTest) throws Exception {
insertObjectWithFactHandle(underTest, new SimpleClass());
assertThat(underTest.iterateObjects()).hasSize(1);
assertThat(collect(underTest.iterateObjects())).hasSize(1);

underTest.clear();

assertThat(underTest.iterateObjects()).isEmpty();
assertThat(collect(underTest.iterateObjects())).isEmpty();
}

@ClassAwareObjectStoreParameterizedTest
Expand All @@ -150,8 +150,8 @@ public void iteratingOverFactHandlesHasSameNumberOfResultsAsIteratingOverObjects
insertObjectWithFactHandle(underTest, new SuperClass());
insertObjectWithFactHandle(underTest, new SubClass());

assertThat(underTest.iterateFactHandles(SubClass.class)).hasSize(1);
assertThat(underTest.iterateFactHandles(SuperClass.class)).hasSize(2);
assertThat(collect(underTest.iterateFactHandles(SubClass.class))).hasSize(1);
assertThat(collect(underTest.iterateFactHandles(SuperClass.class))).hasSize(2);
}


Expand Down
7 changes: 7 additions & 0 deletions pom.xml
Expand Up @@ -76,6 +76,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-bom</artifactId>
<version>${version.io.quarkus}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down

0 comments on commit b1e469c

Please sign in to comment.