Skip to content

Commit b04eca2

Browse files
authored
CPP-829/CPP-830 Port prepare on XXX tests to Google test framework (#315)
1 parent b719493 commit b04eca2

File tree

4 files changed

+507
-643
lines changed

4 files changed

+507
-643
lines changed

cpp-driver/gtests/src/integration/objects/cluster.hpp

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,42 @@ class Cluster : public Object<CassCluster, cass_cluster_free> {
363363
return *this;
364364
}
365365

366+
/**
367+
* Enable whitelist filtering.
368+
*
369+
* @param hosts A comma delimited list of hosts (addresses or
370+
* names)
371+
* @return Cluster object
372+
*/
373+
Cluster& with_whitelist_filtering(const std::string& hosts) {
374+
cass_cluster_set_whitelist_filtering(get(), hosts.c_str());
375+
return *this;
376+
}
377+
378+
/**
379+
* Enable/Disable preparing all hosts when preparing a new statement.
380+
*
381+
* @param enable
382+
* @return Cluster object
383+
*/
384+
Cluster& with_prepare_on_all_hosts(bool enable) {
385+
EXPECT_EQ(CASS_OK,
386+
cass_cluster_set_prepare_on_all_hosts(get(), enable ? cass_true : cass_false));
387+
return *this;
388+
}
389+
390+
/**
391+
* Enable/Disable preparing existing statements on new or down hosts.
392+
*
393+
* @param enable
394+
* @return Cluster object
395+
*/
396+
Cluster& with_prepare_on_up_or_add_host(bool enable) {
397+
EXPECT_EQ(CASS_OK,
398+
cass_cluster_set_prepare_on_up_or_add_host(get(), enable ? cass_true : cass_false));
399+
return *this;
400+
}
401+
366402
/**
367403
* Create a new session and establish a connection to the server;
368404
* synchronously

0 commit comments

Comments
 (0)