Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bts/test_kafka
Ruby Kafka runner suitable for integration testing
https://github.com/bts/test_kafka
Last synced: 27 days ago
JSON representation
Ruby Kafka runner suitable for integration testing
- Host: GitHub
- URL: https://github.com/bts/test_kafka
- Owner: bts
- License: mit
- Created: 2013-11-08T23:52:59.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-06-01T22:12:56.000Z (over 9 years ago)
- Last Synced: 2024-10-06T23:15:47.189Z (about 1 month ago)
- Language: Ruby
- Homepage:
- Size: 176 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# TestKafka
Minimal Kafka 0.8 runner suitable for integration testing.
Adapted from the excellent [poseidon](https://github.com/bpot/poseidon)'s integration tests.
## Installation
Add TestKafka to your application's Gemfile:
```ruby
gem 'test_kafka', '~> 0.1.1'
```and bundle:
$ bundle
## Usage
```ruby
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