echobravopapa commented on a change in pull request #760:
URL: https://github.com/apache/geode-native/pull/760#discussion_r590762097
##########
File path: cppcache/src/TcrMessage.cpp
##########
@@ -1530,7 +1530,7 @@ void TcrMessage::handleByteArrayResponse(
}
m_metadata->push_back(bucketServerLocations);
}
- LOGFINER("Metadata size is %", m_metadata->size());
Review comment:
guess we've been getting lucky here...
##########
File path: cppcache/integration/test/PartitionRegionOpsTest.cpp
##########
@@ -168,97 +186,67 @@ void
putPartitionedRegionWithRedundancyServerGoesDown(bool singleHop) {
int ENTRIES = 30;
- putEntries(region, ENTRIES, 0);
-
- cluster.getServers()[1].stop();
-
- putEntries(region, ENTRIES, 1);
-
- cluster.getServers()[1].start();
-
- putEntries(region, ENTRIES, 2);
-}
+ putEntries(region, ENTRIES, 0, isAllOp);
-void getPartitionedRegionWithRedundancyServerGoesDown(bool singleHop) {
- Cluster cluster{LocatorCount{1}, ServerCount{2}};
- cluster.start();
- cluster.getGfsh()
- .create()
- .region()
- .withName("region")
- .withType("PARTITION")
- .withRedundantCopies("1")
- .execute();
-
- auto cache = createCache();
- auto pool = createPool(cluster, cache, singleHop);
- auto region = setupRegion(cache, pool);
-
- int ENTRIES = 30;
-
- putEntries(region, ENTRIES, 0);
-
- getEntries(region, ENTRIES);
+ getEntries(region, ENTRIES, isAllOp);
cluster.getServers()[1].stop();
- getEntries(region, ENTRIES);
+ getEntries(region, ENTRIES, isAllOp);
cluster.getServers()[1].start();
- getEntries(region, ENTRIES);
+ getEntries(region, ENTRIES, isAllOp);
}
/**
* In this test case we verify that in a partition region with redundancy
- * when one server goes down, all gets are still served.
+ * when one server goes down, all puts and gets are still served.
* Single-hop is enabled in the client.
* It can be observed in the logs that when one of the server goes down
* the bucketServerLocations for that server are removed from the
* client metadata.
*/
TEST(PartitionRegionOpsTest,
- getPartitionedRegionWithRedundancyServerGoesDownSingleHop) {
+ putgetPartitionedRegionWithRedundancyServerGoesDownSingleHop) {
Review comment:
these 4 TEST go thru the input matrix of
`putgetPartitionedRegionWithRedundancyServerGoesDown(bool, bool)`
{true,false; false,false; true,true; false,true} and that's great
I do notice this requires a good bit of comment maintenance, which makes me
wonder if there is a better way to present these test cases for
posterity/maintainability...
##########
File path: cppcache/integration/test/PartitionRegionOpsTest.cpp
##########
@@ -89,19 +89,36 @@ std::shared_ptr<Region> setupRegion(Cache& cache,
}
void putEntries(std::shared_ptr<Region> region, int numEntries,
- int offsetForValue) {
+ int offsetForValue, bool isAllOp) {
Review comment:
maybe a better mnemonic for the bool param... idk what `AllOp` means
##########
File path: cppcache/integration/test/PartitionRegionOpsTest.cpp
##########
@@ -89,19 +89,36 @@ std::shared_ptr<Region> setupRegion(Cache& cache,
}
void putEntries(std::shared_ptr<Region> region, int numEntries,
- int offsetForValue) {
+ int offsetForValue, bool isAllOp) {
Review comment:
maybe `doAllOperations` if i'm following the intention here...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]