Skip to content

Commit 9412fc1

Browse files
authored
MINOR: Update vagrant/tests readme (#9650)
Reviewers: Chia-Ping Tsai <[email protected]>
1 parent 0df4615 commit 9412fc1

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

tests/README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ Running tests using docker
1111
Docker containers can be used for running kafka system tests locally.
1212
* Requirements
1313
- Docker 1.12.3 (or higher) is installed and running on the machine.
14-
- Test require that Kafka, including system test libs, is built. This can be done by running ./gradlew clean systemTestLibs
14+
- Test requires that Kafka, including system test libs, is built. This can be done by running
15+
```
16+
./gradlew clean systemTestLibs
17+
```
1518
* Run all tests
1619
```
1720
bash tests/docker/run_tests.sh
@@ -547,8 +550,10 @@ Where are the unit tests?
547550
* The kafkatest unit tests are located under kafka/tests/unit
548551

549552
How do I run the unit tests?
550-
* cd kafka/tests # The base system test directory
551-
* python3 setup.py test
553+
```bash
554+
$ cd kafka/tests # The base system test directory
555+
$ python3 setup.py test
556+
```
552557

553558
How can I add a unit test?
554559
* Follow the naming conventions - module name starts with "check", class name begins with "Check", test method name begins with "check"

vagrant/README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ Using Vagrant to get up and running.
55
1) Install Virtual Box [https://www.virtualbox.org/](https://www.virtualbox.org/)
66
2) Install Vagrant >= 1.6.4 [https://www.vagrantup.com/](https://www.vagrantup.com/)
77
3) Install Vagrant Plugins:
8+
```
9+
$ vagrant plugin install vagrant-hostmanager
810
9-
$ vagrant plugin install vagrant-hostmanager
10-
# Optional
11-
$ vagrant plugin install vagrant-cachier # Caches & shares package downloads across VMs
11+
# Optional, to caches & shares package downloads across VMs
12+
$ vagrant plugin install vagrant-cachier
13+
```
1214

1315
In the main Kafka folder, do a normal Kafka build:
1416

@@ -48,13 +50,11 @@ To log into one of the machines:
4850

4951
vagrant ssh <machineName>
5052

51-
You can access the brokers and zookeeper by their IP or hostname, e.g.
53+
You can access the brokers by their IP or hostname, e.g.
5254

53-
# Specify ZooKeeper node 1 by it's IP: 192.168.50.11
54-
bin/kafka-topics.sh --create --zookeeper 192.168.50.11:2181 --replication-factor 3 --partitions 1 --topic sandbox
55-
56-
# Specify brokers by their hostnames: broker1, broker2, broker3
57-
bin/kafka-console-producer.sh --broker-list broker1:9092,broker2:9092,broker3:9092 --topic sandbox
55+
# Specify brokers by their hostnames: broker1, broker2, broker3 (or just one of them)
56+
bin/kafka-topics.sh --create --bootstrap-server broker1:9092 --replication-factor 3 --partitions 1 --topic sandbox
57+
bin/kafka-console-producer.sh --bootstrap-server broker1:9092,broker2:9092,broker3:9092 --topic sandbox
5858

5959
# Specify brokers by their IP: 192.168.50.51, 192.168.50.52, 192.168.50.53
6060
bin/kafka-console-consumer.sh --bootstrap-server 192.168.50.51:9092,192.168.50.52:9092,192.168.50.53:9092 --topic sandbox --from-beginning

0 commit comments

Comments
 (0)