dcapwell commented on code in PR #3656:
URL: https://github.com/apache/cassandra/pull/3656#discussion_r1828447055
##########
test/distributed/org/apache/cassandra/fuzz/topology/TopologyMixupTestBase.java:
##########
@@ -153,8 +158,50 @@ private enum RemoveType
private Command<State<S>, Void, ?> waitForCMSToQuiesce()
{
- return new SimpleCommand<>(state -> "Waiting for CMS to Quiesce" +
state.commandNamePostfix(),
- state ->
ClusterUtils.waitForCMSToQuiesce(state.cluster, state.cmsGroup));
+ return new Property.StateOnlyCommand<>()
+ {
+ private Epoch maxEpoch = null;
+ @Override
+ public String detailed(State<S> state)
+ {
+ if (maxEpoch == null)
+ maxEpoch = ClusterUtils.maxEpoch(state.cluster,
state.topologyHistory.up());
+ return "Waiting for CMS to Quiesce on epoch " +
maxEpoch.getEpoch() + state.commandNamePostfix();
+ }
+
+ @Override
+ public void applyUnit(State<S> state)
+ {
+ Invariants.nonNull(maxEpoch, "detailed was not called before
calling apply");
+ ClusterUtils.waitForCMSToQuiesce(state.cluster, maxEpoch,
true);
+ }
+ };
+ }
+
+ private Command<State<S>, Void, ?> waitForGossipToSettle()
Review Comment:
logically we shouldn't need this as we have TCM waiting... but this actually
was super useful to find out that bootstrap can fail and the test thinks it was
success!!!!! I left it as I had value, even though it should never fail
again... right? =D
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]