Skip to content

Commit

Permalink
revved versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyrdavis committed Sep 17, 2020
1 parent 31a074c commit b229b50
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 39 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.redhat.quarkus</groupId>
<artifactId>quarkus-cafe-demo</artifactId>
<packaging>pom</packaging>
<version>2.5.1</version>
<version>2.7.0</version>
<name>Quarkus, Kafka, and Kubernetes</name>
<modules>
<module>quarkus-cafe-parent</module>
Expand Down
4 changes: 2 additions & 2 deletions quarkus-cafe-barista/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<artifactId>quarkus-cafe-demo-parent</artifactId>
<groupId>com.redhat.demos</groupId>
<version>2.6.1</version>
<version>2.7.0</version>
<relativePath>../quarkus-cafe-parent</relativePath>
</parent>
<groupId>com.redhat.quarkus</groupId>
<artifactId>quarkus-cafe-barista</artifactId>
<version>2.5.2</version>
<version>2.7.0</version>
<properties />
<dependencyManagement />
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
package com.redhat.quarkus.cafe.barista.infrastructure;

import com.redhat.quarkus.cafe.barista.domain.Barista;
import com.redhat.quarkus.cafe.domain.EventType;
import com.redhat.quarkus.cafe.domain.Item;
import com.redhat.quarkus.cafe.domain.OrderInEvent;
import com.redhat.quarkus.cafe.domain.OrderUpEvent;
import com.redhat.quarkus.cafe.domain.*;
import com.redhat.quarkus.cafe.infrastructure.KafkaIT;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.apache.kafka.clients.consumer.ConsumerRecords;
import org.apache.kafka.clients.consumer.KafkaConsumer;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.common.serialization.StringDeserializer;
import org.apache.kafka.common.serialization.StringSerializer;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import javax.inject.Inject;
import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonReader;
import javax.json.bind.Jsonb;
import javax.json.bind.JsonbBuilder;
import java.io.StringReader;
import java.time.Duration;
import java.util.*;

Expand All @@ -37,6 +30,9 @@ public class BaristaIT extends KafkaIT {

Jsonb jsonb = JsonbBuilder.create();

public BaristaIT() {
}

@Test
public void testOrderIn() {
OrderInEvent orderIn = new OrderInEvent(EventType.BEVERAGE_ORDER_IN, UUID.randomUUID().toString(), UUID.randomUUID().toString(), "Lemmy", Item.COFFEE_BLACK);
Expand All @@ -56,11 +52,12 @@ public void testOrderIn() {
for (ConsumerRecord<String, String> record : baristaRecords) {
System.out.println(record.value());
//[{"item":"COFFEE_BLACK","itemId":"901f1fb5-7ebf-4d2d-b0cd-0a80fa5a91e2","name":"Lemmy","orderId":"8a44cc4c-df49-4180-b0c5-c4ef34def5be","eventType":"BEVERAGE_ORDER_UP","madeBy":"jedavis-mac"}]
OrderUpEvent[] results = jsonb.fromJson(record.value(), new OrderUpEvent[] {}.getClass());
assertEquals(EventType.BEVERAGE_ORDER_UP, results[0].eventType);
assertEquals("Lemmy", results[0].name);
assertEquals(Item.COFFEE_BLACK, results[0].item);
assertNotNull(results[0].madeBy);
System.out.println(record.value());
JsonReader jsonReader = Json.createReader(new StringReader(record.value()));
JsonObject jsonObject = jsonReader.readObject();
assertEquals("Lemmy", jsonObject.getString("name"));
assertEquals(Item.COFFEE_BLACK.toString(), jsonObject.getString("item"));
assertEquals(EventType.BEVERAGE_ORDER_UP.toString(), jsonObject.getString("eventType"));
}
}

Expand Down
4 changes: 2 additions & 2 deletions quarkus-cafe-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<artifactId>quarkus-cafe-demo-parent</artifactId>
<groupId>com.redhat.demos</groupId>
<version>2.6.1</version>
<version>2.7.0</version>
<relativePath>../quarkus-cafe-parent</relativePath>
</parent>
<groupId>com.redhat.quarkus</groupId>
<artifactId>quarkus-cafe-core</artifactId>
<version>2.4.1</version>
<version>2.7.0</version>
<properties />
<dependencyManagement />
<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions quarkus-cafe-customermock/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<groupId>com.redhat.demos</groupId>
<artifactId>quarkus-cafe-demo-parent</artifactId>
<version>2.6.1</version>
<version>2.7.0</version>
<relativePath>../quarkus-cafe-parent</relativePath>
</parent>
<groupId>com.redhat.quarkus.cafe</groupId>
<artifactId>quarkus-cafe-customermocker</artifactId>
<version>2.5.0</version>
<version>2.7.0</version>
<dependencyManagement>
<dependencies>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions quarkus-cafe-domain/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<parent>
<artifactId>quarkus-cafe-demo-parent</artifactId>
<groupId>com.redhat.demos</groupId>
<version>2.6.1</version>
<version>2.7.0</version>
<relativePath>../quarkus-cafe-parent</relativePath>
</parent>

<groupId>com.redhat.quarkus</groupId>
<artifactId>quarkus-cafe-domain</artifactId>
<version>2.6.0-SNAPSHOT</version>
<version>2.7.0</version>
<name>quarkus-cafe-domain</name>
<properties />

Expand Down
4 changes: 2 additions & 2 deletions quarkus-cafe-json-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.redhat.quarkus</groupId>
<artifactId>quarkus-cafe-json-service</artifactId>
<version>2.2.1</version>
<version>2.7.0</version>
<parent>
<artifactId>quarkus-cafe-demo-parent</artifactId>
<groupId>com.redhat.demos</groupId>
<version>2.6.1</version>
<version>2.7.0</version>
<relativePath>../quarkus-cafe-parent</relativePath>
</parent>
<properties/>
Expand Down
4 changes: 2 additions & 2 deletions quarkus-cafe-kitchen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<artifactId>quarkus-cafe-demo-parent</artifactId>
<groupId>com.redhat.demos</groupId>
<version>2.6.1</version>
<version>2.7.0-SNAPSHOT</version>
<relativePath>../quarkus-cafe-parent</relativePath>
</parent>
<groupId>com.redhat.quarkus.cafe</groupId>
<artifactId>quarkus-cafe-kitchen</artifactId>
<version>2.5.2</version>
<version>2.7.0-SNAPSHOT</version>
<properties />
<dependencyManagement />
<dependencies>
Expand Down
6 changes: 3 additions & 3 deletions quarkus-cafe-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.redhat.demos</groupId>
<artifactId>quarkus-cafe-demo-parent</artifactId>
<packaging>pom</packaging>
<version>2.6.1</version>
<version>2.7.0</version>
<name>Quarkus, Kafka, and Kubernetes</name>
<properties>
<!-- generated -->
Expand All @@ -25,8 +25,8 @@
<testcontainers.version>1.14.3</testcontainers.version>
<kafka-clients.version>2.6.0</kafka-clients.version>
<!-- project versions -->
<cafe-domain.version>2.5.1</cafe-domain.version>
<cafe-test-utils.version>2.4.1</cafe-test-utils.version>
<cafe-domain.version>2.7.0</cafe-domain.version>
<cafe-test-utils.version>2.7.0</cafe-test-utils.version>
</properties>
<dependencyManagement>
<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions quarkus-cafe-test-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<artifactId>quarkus-cafe-demo-parent</artifactId>
<groupId>com.redhat.demos</groupId>
<version>2.6.1</version>
<version>2.7.0</version>
<relativePath>../quarkus-cafe-parent</relativePath>
</parent>
<groupId>com.redhat.quarkus</groupId>
<artifactId>quarkus-cafe-test-utils</artifactId>
<version>2.5.0-SNAPSHOT</version>
<version>2.7.0</version>
<properties />
<dependencyManagement />
<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions quarkus-cafe-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<artifactId>quarkus-cafe-demo-parent</artifactId>
<groupId>com.redhat.demos</groupId>
<version>2.6.1</version>
<version>2.7.0</version>
<relativePath>../quarkus-cafe-parent</relativePath>
</parent>
<groupId>com.redhat.quarkus.cafe</groupId>
<artifactId>quarkus-cafe-web</artifactId>
<version>2.5.1</version>
<version>2.7.0</version>
<properties />
<dependencyManagement />
<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions quarkus-coffesshop-inventory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.redhat.demos</groupId>
<artifactId>quarkus-coffesshop-inventory</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
<parent>
<artifactId>quarkus-cafe-demo-parent</artifactId>
<groupId>com.redhat.demos</groupId>
<version>2.6.1</version>
<version>2.7.0-SNAPSHOT</version>
<relativePath>../quarkus-cafe-parent</relativePath>
</parent>
<properties />
Expand Down

0 comments on commit b229b50

Please sign in to comment.