Skip to content

Commit

Permalink
Merge pull request #427 from camunda-community-hub/np-fix-build
Browse files Browse the repository at this point in the history
Fix build issues after weird auto merges
  • Loading branch information
npepinpe authored Feb 14, 2023
2 parents 6b5a09d + fe43783 commit b1ef820
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 367 deletions.
17 changes: 4 additions & 13 deletions exporter-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand All @@ -80,18 +74,15 @@
</exclusions>
</dependency>

<!-- TODO: replace all of these with zeebe-protocol-test-util on 8.1.0 -->
<dependency>
<groupId>io.github.classgraph</groupId>
<artifactId>classgraph</artifactId>
<version>4.8.154</version>
<groupId>io.camunda</groupId>
<artifactId>zeebe-protocol-test-util</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jeasy</groupId>
<artifactId>easy-random-core</artifactId>
<version>5.0.0</version>
<groupId>io.camunda</groupId>
<artifactId>zeebe-exporter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
import com.github.tomakehurst.wiremock.junit5.WireMockRuntimeInfo;
import com.github.tomakehurst.wiremock.junit5.WireMockTest;
import com.github.tomakehurst.wiremock.matching.EqualToJsonPattern;
import io.camunda.zeebe.exporter.test.ExporterTestContext;
import io.camunda.zeebe.exporter.test.ExporterTestController;
import io.camunda.zeebe.protocol.record.Record;
import io.camunda.zeebe.test.broker.protocol.ProtocolFactory;
import java.net.ConnectException;
import java.util.Collections;
import org.junit.jupiter.api.BeforeEach;
Expand All @@ -33,8 +36,8 @@

final class DebugExporterTest {
private final ProtocolFactory recordFactory = new ProtocolFactory();
private final TestExporterApi.TestContext context = new TestExporterApi.TestContext();
private final TestExporterApi.TestController controller = new TestExporterApi.TestController();
private final ExporterTestContext context = new ExporterTestContext();
private final ExporterTestController controller = new ExporterTestController();
private final DebugExporter exporter = new DebugExporter();

@Test
Expand Down Expand Up @@ -105,7 +108,9 @@ void shouldHandleNoResponseBody() {
exporter.export(record);

// then
assertThat(controller.position()).as("acknowledged position has not changed").isEqualTo(10L);
assertThat(controller.getPosition())
.as("acknowledged position has not changed")
.isEqualTo(10L);
}

@Test
Expand All @@ -122,7 +127,7 @@ void shouldHandleAcknowledgedPositionResponse() {
exporter.export(record);

// then
assertThat(controller.position()).isEqualTo(20L);
assertThat(controller.getPosition()).isEqualTo(20L);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@

import static org.assertj.core.api.Assertions.assertThat;

import io.camunda.zeebe.exporter.test.ExporterTestContext;
import io.camunda.zeebe.exporter.test.ExporterTestController;
import io.camunda.zeebe.protocol.record.Record;
import io.camunda.zeebe.protocol.record.RecordValue;
import io.zeebe.containers.exporter.TestExporterApi.TestContext;
import io.zeebe.containers.exporter.TestExporterApi.TestController;
import io.camunda.zeebe.test.broker.protocol.ProtocolFactory;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.stream.Collectors;
Expand All @@ -30,7 +31,6 @@

final class ExporterIntegrationTest {
private final ProtocolFactory recordFactory = new ProtocolFactory();

private final List<Record<?>> exportedRecords = new CopyOnWriteArrayList<>();
private final DebugReceiver receiver = new DebugReceiver(exportedRecords::add, 0, false);

Expand All @@ -40,8 +40,8 @@ void beforeEach() {
}

private static final class Partition {
private final TestController controller = new TestController();
private final TestContext context = new TestContext();
private final ExporterTestController controller = new ExporterTestController();
private final ExporterTestContext context = new ExporterTestContext();
private final DebugExporter exporter = new DebugExporter();

private void prepare(final String endpoint) throws Exception {
Expand All @@ -54,8 +54,8 @@ private void prepare(final String endpoint) throws Exception {

@Nested
final class SinglePartitionTest {
private final TestController controller = new TestController();
private final TestContext context = new TestContext();
private final ExporterTestController controller = new ExporterTestController();
private final ExporterTestContext context = new ExporterTestContext();
private final DebugExporter exporter = new DebugExporter();

@BeforeEach
Expand Down Expand Up @@ -92,7 +92,7 @@ void shouldAcknowledgeRecord() {
exporter.export(record);

// then
assertThat(controller.position()).isEqualTo(30L);
assertThat(controller.getPosition()).isEqualTo(30L);
}
}

Expand Down Expand Up @@ -138,8 +138,8 @@ void shouldAcknowledgeRecords() {
partitionTwo.exporter.export(partTwoRecord);

// then
assertThat(partitionOne.controller.position()).isEqualTo(30L);
assertThat(partitionTwo.controller.position()).isEqualTo(35L);
assertThat(partitionOne.controller.getPosition()).isEqualTo(30L);
assertThat(partitionTwo.controller.getPosition()).isEqualTo(35L);
}
}
}

This file was deleted.

Loading

0 comments on commit b1ef820

Please sign in to comment.