Skip to content

Commit d8e7023

Browse files
committed
Improved documentation/examples.
1 parent 42c8c44 commit d8e7023

File tree

2 files changed

+41
-9
lines changed

2 files changed

+41
-9
lines changed

cluster/readme.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Cluster Testing
2+
3+
To test clusters, you need to set up three redis instances (shards) and bind them together into a cluster.
4+
5+
## Running Tests
6+
7+
``` bash
8+
$ cd cluster
9+
$ docker-compose up tests
10+
[+] Running 5/0
11+
✔ Container cluster-redis-b-1 Running
12+
✔ Container cluster-redis-c-1 Running
13+
✔ Container cluster-redis-a-1 Running
14+
✔ Container cluster-controller-1 Running
15+
✔ Container cluster-tests-1 Created
16+
Attaching to tests-1
17+
tests-1 | Bundle complete! 13 Gemfile dependencies, 41 gems now installed.
18+
tests-1 | Use `bundle info [gemname]` to see where a bundled gem is installed.
19+
tests-1 | 6 installed gems you directly depend on are looking for funding.
20+
tests-1 | Run `bundle fund` for details
21+
tests-1 | 0 assertions
22+
tests-1 | 🏁 Finished in 4.9ms; 0.0 assertions per second.
23+
tests-1 | 🐇 No slow tests found! Well done!
24+
tests-1 exited with code 0
25+
```

sentinel/readme.md

+16-9
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,21 @@ To test sentinels, you need to set up master, slave and sentinel instances.
77
``` bash
88
$ cd sentinel
99
$ docker-compose up tests
10-
[+] Running 3/3
11-
✔ Container sentinel-redis-master-1 Running 0.0s
12-
✔ Container sentinel-redis-slave-1 Running 0.0s
13-
✔ Container sentinel-redis-sentinel-1 Started 0.2s
14-
```
15-
16-
## Test
10+
[+] Running 4/0
11+
✔ Container sentinel-redis-master-1 Created
12+
✔ Container sentinel-redis-slave-1 Created
13+
✔ Container sentinel-redis-sentinel-1 Created
14+
✔ Container sentinel-tests-1 Created
15+
Attaching to tests-1
16+
tests-1 | Bundle complete! 13 Gemfile dependencies, 41 gems now installed.
17+
tests-1 | Use `bundle info [gemname]` to see where a bundled gem is installed.
18+
tests-1 | 6 installed gems you directly depend on are looking for funding.
19+
tests-1 | Run `bundle fund` for details
20+
tests-1 | 3 passed out of 3 total (3 assertions)
21+
tests-1 | 🏁 Finished in 4.1s; 0.74 assertions per second.
22+
tests-1 | 🐢 Slow tests:
23+
tests-1 | 4.1s: describe Async::Redis::SentinelClient it should resolve slave address sentinel/test/async/redis/sentinel_client.rb:35
24+
tests-1 exited with code 0
1725

18-
``` bash
19-
$ ASYNC_REDIS_MASTER=redis://redis-master:6379 ASYNC_REDIS_SLAVE=redis://redis-slave:6379 ASYNC_REDIS_SENTINEL=redis://redis-sentinel:26379 bundle exec sus
2026
```
27+

0 commit comments

Comments
 (0)