Add pytest test example about connecting to a worker

pull/7386/head
Jelte Fennema-Nio 2023-12-22 09:06:50 +01:00
parent 6801a1ed1e
commit 9820d2c6ae
1 changed files with 1 additions and 0 deletions

View File

@ -82,6 +82,7 @@ the name of the fixture. For example:
```python
def test_some_query(cluster):
cluster.coordinator.sql("SELECT 1")
assert cluster.workers[0].sql_value('SELECT 2') == 2
```
If you need a cluster of a specific size you can use the `cluster_factory`