@Test public void nodeRestartWithSameAddressDifferentId() throws Throwable { int failedNodeCount = 1; int afterFailureQuorum = this.nodeCount - failedNodeCount; setUp(this.nodeCount); setOperationTimeoutMicros(TimeUnit.SECONDS.toMicros(5)); this.host.joinNodesAndVerifyConvergence(this.nodeCount); this.host.log("Stopping node"); this.host.setNodeGroupQuorum(afterFailureQuorum); List<ServiceHostState> hostStates = stopHostsToSimulateFailure(failedNodeCount); URI remainingPeerNodeGroup = this.host.getPeerNodeGroupUri(); this.host.waitForNodeGroupConvergence(this.nodeCount - failedNodeCount); ServiceHostState stoppedHostState = hostStates.get(0); this.host.testStart(1); VerificationHost newHost = this.host.setUpLocalPeerHost(stoppedHostState.httpPort, VerificationHost.FAST_MAINT_INTERVAL_MILLIS, null); this.host.testWait(); URI newHostNodeGroupService = UriUtils .buildUri(newHost.getUri(), ServiceUriPaths.DEFAULT_NODE_GROUP); this.host.testStart(1); this.host.joinNodeGroup(newHostNodeGroupService, remainingPeerNodeGroup); this.host.testWait(); this.host.waitForNodeGroupConvergence(this.nodeCount); }
@Override public URI getUri() { if (this.uri == null) { this.uri = super.getUri(); } return this.uri; }
NodeGroupService extends StatefulService { @Override public URI getUri() { if (this.uri == null) { this.uri = super.getUri(); } return this.uri; } }
NodeGroupService extends StatefulService { @Override public URI getUri() { if (this.uri == null) { this.uri = super.getUri(); } return this.uri; } NodeGroupService(); }
NodeGroupService extends StatefulService { @Override public URI getUri() { if (this.uri == null) { this.uri = super.getUri(); } return this.uri; } NodeGroupService(); @Override URI getUri(); @Override void handleStart(Operation startPost); @Override void handleGet(Operation get); @Override void handlePatch(Operation patch); @Override void handlePost(Operation post); @Override void handleMaintenance(Operation maint); void handleGossipPatchCompletion(long sendTimeMicros, Operation maint, Operation patch,
            Throwable e,
            NodeGroupState localState, NodeGroupState patchBody, AtomicInteger remaining,
            NodeState remotePeer); }
NodeGroupService extends StatefulService { @Override public URI getUri() { if (this.uri == null) { this.uri = super.getUri(); } return this.uri; } NodeGroupService(); @Override URI getUri(); @Override void handleStart(Operation startPost); @Override void handleGet(Operation get); @Override void handlePatch(Operation patch); @Override void handlePost(Operation post); @Override void handleMaintenance(Operation maint); void handleGossipPatchCompletion(long sendTimeMicros, Operation maint, Operation patch,
            Throwable e,
            NodeGroupState localState, NodeGroupState patchBody, AtomicInteger remaining,
            NodeState remotePeer); static final String STAT_NAME_JOIN_RETRY_COUNT; static final String STAT_NAME_REMOTE_FALSE_UNAVAILABLE_COUNT; static final String PROPERTY_NAME_PEER_REQUEST_TIMEOUT_MICROS; static final long PEER_REQUEST_TIMEOUT_MICROS; static final int MIN_PEER_GOSSIP_COUNT; static final String STAT_NAME_RESTARTING_SERVICES_COUNT; static final String STAT_NAME_RESTARTING_SERVICES_FAILURE_COUNT; static final String STAT_NAME_PREFIX_GOSSIP_PATCH_DURATION; }