Package io.debezium.server.redis
Class RedisStreamIT
java.lang.Object
io.debezium.server.redis.RedisStreamIT
@QuarkusTestResource(RedisTestResourceLifecycleManager.class)
public class RedisStreamIT
extends Object
Integration tests that verify basic reading from PostgreSQL database and writing to Redis stream
and retry mechanism in case of connectivity issues or OOM in Redis
- Author:
- M Sazzadul Hoque, Yossi Shirizli
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidTest retry mechanism when encountering Redis connectivity issues: 1.voidTest retry mechanism when encountering Redis Out of Memory: 1.voidVerifies that all the records of a PostgreSQL table are streamed to Redis
-
Constructor Details
-
RedisStreamIT
public RedisStreamIT()
-
-
Method Details
-
testRedisStream
Verifies that all the records of a PostgreSQL table are streamed to Redis- Throws:
Exception
-
testRedisConnectionRetry
Test retry mechanism when encountering Redis connectivity issues: 1. Make Redis to be unavailable while the server is up 2. Create a new table named redis_test in PostgreSQL and insert 5 records to it 3. Bring Redis up again and make sure these records have been streamed successfully- Throws:
Exception
-
testRedisOOMRetry
Test retry mechanism when encountering Redis Out of Memory: 1. Simulate a Redis OOM by setting its max memory to 1M 2. Create a new table named redis_test2 in PostgreSQL and insert 50 records to it 3. Sleep for 1 second to simulate Redis OOM (stream does not contain 50 records) 4. Unlimit memory and verify that all 50 records have been streamed- Throws:
Exception
-