Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/minor improvements #899

Merged
merged 3 commits into from
Aug 4, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ services:
kafka:
image: confluentinc/cp-kafka:latest
ports:
- "9092:9092" # plaintext - no authentication
- "9093:9093" # sasl
- "9095:9095" # plaintext - no authentication (port 9095 avoids conflict with kafka plugin)
volumes:
- ./broker_jaas.conf:/etc/kafka/secrets/broker_jaas.conf
environment:
KAFKA_NODE_ID: 1
CLUSTER_ID: 'MkU3OEVBNTcwNTJENDM2Qk=='
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092, INTERNAL://kafka:29092, SASL_PLAINTEXT://0.0.0.0:9093, SASL_INTERNAL://kafka:29093, CONTROLLER://kafka:29099
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,INTERNAL://kafka:29092, SASL_PLAINTEXT://localhost:9093,SASL_INTERNAL://kafka:29093
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9095, INTERNAL://kafka:29092, SASL_PLAINTEXT://0.0.0.0:9093, SASL_INTERNAL://kafka:29093, CONTROLLER://kafka:29099
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9095,INTERNAL://kafka:29092, SASL_PLAINTEXT://localhost:9093,SASL_INTERNAL://kafka:29093
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,INTERNAL:PLAINTEXT, SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_INTERNAL:SASL_PLAINTEXT, CONTROLLER:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
KAFKA_PROCESS_ROLES: 'controller,broker'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#########
# Spring configuration
spring.application.name=Springwolf example project - Cloud Stream
spring.kafka.bootstrap-servers=${BOOTSTRAP_SERVER:localhost:9092}
spring.kafka.bootstrap-servers=${BOOTSTRAP_SERVER:localhost:9095}


#########
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@EmbeddedKafka(
partitions = 1,
brokerProperties = {"listeners=PLAINTEXT://localhost:9092", "port=9092"})
brokerProperties = {"listeners=PLAINTEXT://localhost:9095", "port=9095"})
@DirtiesContext
public class ApiIntegrationTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class SpringContextIntegrationTest {
@SpringBootTest(classes = SpringwolfCloudstreamExampleApplication.class)
@EmbeddedKafka(
partitions = 1,
brokerProperties = {"listeners=PLAINTEXT://localhost:9092", "port=9092"})
brokerProperties = {"listeners=PLAINTEXT://localhost:9095", "port=9095"})
@Nested
@DirtiesContext
@TestPropertySource(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@EmbeddedKafka(
partitions = 1,
brokerProperties = {"listeners=PLAINTEXT://localhost:9092", "port=9092"})
brokerProperties = {"listeners=PLAINTEXT://localhost:9095", "port=9095"})
@DirtiesContext
class SpringwolfCloudstreamExampleApplicationIntegrationTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ void publishWithSendToUser() throws ExecutionException, InterruptedException, Ti

// then
ExamplePayloadDto response = stompTestUtil.getMessage();
assertEquals(response, payload);
assertEquals(payload, response);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public R getMessage() throws InterruptedException {
}

public void send(String destination, Object payload) {
log.info("Sending message to {} with payload {}", destination, payload);
session.send(destination, payload);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ import { Example } from "../../../models/example.model";
import { JsonComponent } from "../../json/json.component";
import { render, screen } from "@testing-library/angular";
import { SchemaRangeComponent } from "../../schemas/range/schema-range.component";
import { MatDividerModule } from "@angular/material/divider";

describe("SchemaNewComponent", () => {
beforeEach(async () => {
const mockedSchemaRangeComponent = jest.fn();

await render(SchemaNewComponent, {
declarations: [SchemaNewComponent, SchemaRangeComponent, JsonComponent],
imports: [MatChipsModule, MarkdownModule.forRoot()],
imports: [MatChipsModule, MatDividerModule, MarkdownModule.forRoot()],
providers: [
{ provide: SchemaRangeComponent, useValue: mockedSchemaRangeComponent },
],
Expand Down