Skip to content

bts/test_kafka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TestKafka

Minimal Kafka 0.8 runner suitable for integration testing.

Adapted from the excellent poseidon's integration tests.

Installation

Add TestKafka to your application's Gemfile:

gem 'test_kafka', '~> 0.1.1'

and bundle:

$ bundle

Usage

require 'test_kafka'

cluster = TestKafka.start('/usr/local/kafka')
# or specify custom a temp directory and kafka/zk ports:
# cluster = TestKafka.start('/usr/local/kafka', '/tmp', 9092, 2181)

# ... interact with Kafka/ZK ...

cluster.with_interruption do
  # broker temporarily stopped in this block
end

# broker is back up

cluster.stop

Requirements

  • Kafka 0.8 or higher

About

Ruby Kafka runner suitable for integration testing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages