forked from shotover/shotover-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prevent recompiling by properly specifying build.rs (shotover#1005)
- Loading branch information
Showing
11 changed files
with
138 additions
and
9 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use serial_test::serial; | ||
use test_helpers::docker_compose::DockerCompose; | ||
|
||
mod test_cases; | ||
|
||
#[tokio::test] | ||
#[serial] | ||
async fn basic() { | ||
let _docker_compose = DockerCompose::new("tests/test-configs/kafka-simple/docker-compose.yaml"); | ||
test_cases::basic().await; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
use rdkafka::config::ClientConfig; | ||
use rdkafka::message::{Header, OwnedHeaders}; | ||
use rdkafka::producer::{FutureProducer, FutureRecord}; | ||
use std::time::Duration; | ||
|
||
async fn produce(brokers: &str, topic_name: &str) { | ||
let producer: &FutureProducer = &ClientConfig::new() | ||
.set("bootstrap.servers", brokers) | ||
.set("message.timeout.ms", "5000") | ||
.create() | ||
.expect("Producer creation error"); | ||
|
||
let delivery_status = producer | ||
.send( | ||
FutureRecord::to(topic_name) | ||
.payload("Message") | ||
.key("Key") | ||
.headers(OwnedHeaders::new().insert(Header { | ||
key: "header_key", | ||
value: Some("header_value"), | ||
})), | ||
Duration::from_secs(0), | ||
) | ||
.await | ||
.unwrap(); | ||
|
||
assert_eq!(delivery_status, (0, 0)); | ||
} | ||
|
||
pub async fn basic() { | ||
produce("localhost:9092", "foo").await; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
mod cassandra_int_tests; | ||
pub mod codec; | ||
mod examples; | ||
mod kafka_int_tests; | ||
mod redis_int_tests; | ||
pub mod runner; | ||
pub mod transforms; | ||
mod runner; | ||
mod transforms; |
19 changes: 19 additions & 0 deletions
19
shotover-proxy/tests/test-configs/kafka-simple/docker-compose.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: "3" | ||
services: | ||
kafka: | ||
image: 'bitnami/kafka:3.3.2' | ||
ports: | ||
- '9092:9092' | ||
environment: | ||
- KAFKA_ENABLE_KRAFT=yes | ||
- KAFKA_CFG_PROCESS_ROLES=broker,controller | ||
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER | ||
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093 | ||
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT | ||
- KAFKA_BROKER_ID=1 | ||
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092 | ||
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@127.0.0.1:9093 | ||
- ALLOW_PLAINTEXT_LISTENER=yes | ||
volumes: | ||
- type: tmpfs | ||
target: /bitnami/kafka |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters