accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joshelser <>
Subject [GitHub] accumulo issue #254: [ACCUMULO-4506] Add a timeout to the replication task
Date Fri, 28 Apr 2017 14:38:55 GMT
Github user joshelser commented on the issue:
    > the replicate call takes in the ReplicaSystemHelper as an argument and I wasn't too
sure how to go about creating an instance of that
    Nothing special, just instantiate it. It requires a `ClientContext` which you can also
mock (the implementation just uses that to get at a `Connector`).
    It may make your life easier to break up `_replicate(..)` further - I think that would
be good if it makes your testing even easier.
    } else {
      span = Trace.start("WAL replication");
      try {
        finalStatus = replicateLogs(peerContext, peerTserver, target, p, status, sizeLimit,
remoteTableId, peerContext.rpcCreds(), helper, accumuloUgi);
      } finally {
    This section is most of what you changed. What if you lift this into its own method, and
then use that as the entry-point to test? Something like `replicateLogsWithTimeout()`..

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message