Skip to content

Commit df6e69e

Browse files
committed
[PYTHON-1171] Fix paging tests by querying at local quorum
1 parent a8c37f8 commit df6e69e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/integration/standard/test_query_paging.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
1514
from tests.integration import use_singledc, PROTOCOL_VERSION
1615

1716
import logging
@@ -26,7 +25,8 @@
2625
from six.moves import range
2726
from threading import Event
2827

29-
from cassandra.cluster import Cluster
28+
from cassandra import ConsistencyLevel
29+
from cassandra.cluster import Cluster, EXEC_PROFILE_DEFAULT, ExecutionProfile
3030
from cassandra.concurrent import execute_concurrent, execute_concurrent_with_args
3131
from cassandra.policies import HostDistance
3232
from cassandra.query import SimpleStatement
@@ -44,7 +44,10 @@ def setUp(self):
4444
"Protocol 2.0+ is required for Paging state, currently testing against %r"
4545
% (PROTOCOL_VERSION,))
4646

47-
self.cluster = Cluster(protocol_version=PROTOCOL_VERSION)
47+
self.cluster = Cluster(
48+
protocol_version=PROTOCOL_VERSION,
49+
execution_profiles={EXEC_PROFILE_DEFAULT: ExecutionProfile(consistency_level=ConsistencyLevel.LOCAL_QUORUM)}
50+
)
4851
if PROTOCOL_VERSION < 3:
4952
self.cluster.set_core_connections_per_host(HostDistance.LOCAL, 1)
5053
self.session = self.cluster.connect(wait_for_all_pools=True)

0 commit comments

Comments
 (0)