From 5ec056a172dd2db61c5d76ae57fb4b4b965cbe3f Mon Sep 17 00:00:00 2001 From: Jelte Fennema-Nio Date: Thu, 18 Jan 2024 13:05:24 +0100 Subject: [PATCH] Add pytest test example about connecting to a worker (#7386) I noticed while reviewing #7203 that there as no example of executing sql on a worker for the pytest README. Since this is a pretty common thing that people want to do, this PR adds that. --- src/test/regress/citus_tests/test/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/regress/citus_tests/test/README.md b/src/test/regress/citus_tests/test/README.md index 6aac98e49..73435ecf6 100644 --- a/src/test/regress/citus_tests/test/README.md +++ b/src/test/regress/citus_tests/test/README.md @@ -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`