Skip to content
Merged
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
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<module>source</module>
<module>sink</module>
<module>packaging</module>
<module>testing</module>
</modules>
<properties>
<annotations.version>24.0.1</annotations.version>
Expand All @@ -57,6 +58,7 @@
<maven-enforcer-plugin.version>3.3.0</maven-enforcer-plugin.version>
<maven-failsafe-plugin.version>3.1.2</maven-failsafe-plugin.version>
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
<mockito-kotlin.version>5.1.0</mockito-kotlin.version>
<mockito.version>5.5.0</mockito.version>
<neo4j-java-driver.version>4.4.9</neo4j-java-driver.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -162,6 +164,11 @@
<artifactId>annotations</artifactId>
<version>${annotations.version}</version>
</dependency>
<dependency>
<groupId>org.mockito.kotlin</groupId>
<artifactId>mockito-kotlin</artifactId>
<version>${mockito-kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j.driver</groupId>
<artifactId>neo4j-java-driver</artifactId>
Expand Down
17 changes: 7 additions & 10 deletions source/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
<name>source</name>
<description>Neo4j Connector for Kafka - Source</description>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.neo4j.connectors.kafka</groupId>
<artifactId>common</artifactId>
Expand All @@ -31,11 +27,6 @@
<version>${kafka.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-avro-serializer</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand All @@ -48,7 +39,7 @@
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
<artifactId>kotlin-test-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -61,6 +52,12 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.neo4j.connectors.kafka</groupId>
<artifactId>testing</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ import org.apache.avro.generic.GenericRecord
import org.apache.kafka.clients.consumer.KafkaConsumer
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestInfo
import org.neo4j.connectors.kafka.source.testing.Neo4jSource
import org.neo4j.connectors.kafka.source.testing.TopicVerifier
import org.neo4j.connectors.kafka.testing.Neo4jSource
import org.neo4j.connectors.kafka.testing.TopicConsumer
import org.neo4j.connectors.kafka.testing.TopicVerifier
import org.neo4j.driver.Session

class Neo4jSourceIT {
Expand All @@ -34,14 +35,13 @@ class Neo4jSourceIT {
@Neo4jSource(
topic = TOPIC,
streamingProperty = "timestamp",
streamingFrom = StreamingFrom.ALL,
streamingFrom = "ALL",
streamingQuery =
"MATCH (ts:TestSource) WHERE ts.timestamp > \$lastCheck RETURN ts.name AS name, ts.surname AS surname, ts.timestamp AS timestamp, ts.execId AS execId",
consumerOffset = "earliest",
)
"MATCH (ts:TestSource) WHERE ts.timestamp > \$lastCheck RETURN ts.name AS name, ts.surname AS surname, ts.timestamp AS timestamp, ts.execId AS execId")
@Test
fun `reads latest changes from Neo4j source`(
testInfo: TestInfo,
@TopicConsumer(topic = TOPIC, offset = "earliest")
consumer: KafkaConsumer<String, GenericRecord>,
session: Session
) {
Expand Down
Loading