@Nullable CommittedWaveletSnapshot snapshot, List<TransformedWaveletDelta> deltas, @Nullable HashedVersion committedVersion, Boolean hasMarker, String channel_id) { ProtocolWaveletUpdate.Builder builder = ProtocolWaveletUpdate.newBuilder(); if (hasMarker != null) { builder.setMarker(hasMarker.booleanValue());
@Override public void run(ProtocolWaveletUpdate update) { ++counter; assertEquals(WAVELET_NAME, getWaveletName(update.getWaveletName())); assertEquals(DELTAS.size(), update.getAppliedDeltaCount()); for (int i = 0; i < update.getAppliedDeltaCount(); ++i) { assertEquals(DELTAS.get(i), update.getAppliedDelta(i)); } assertFalse(update.hasCommitNotice()); } });
@Override public void run(ProtocolWaveletUpdate update) { ++counter; assertEquals(WAVELET_NAME, getWaveletName(update.getWaveletName())); assertTrue(update.hasCommitNotice()); assertEquals(BEGIN_VERSION, CoreWaveletOperationSerializer.deserialize(update.getCommitNotice())); } });
final int MESSAGES_BEFORE_CANCEL = 5; final ProtocolWaveletUpdate cannedResponse = ProtocolWaveletUpdate.newBuilder().setWaveletName("").build(); final CountDownLatch responseLatch = new CountDownLatch(MESSAGES_BEFORE_CANCEL); final CountDownLatch finishedLatch = new CountDownLatch(1);
final int MESSAGES_BEFORE_CANCEL = 5; final ProtocolWaveletUpdate cannedResponse = ProtocolWaveletUpdate.newBuilder().setWaveletName("").build(); final CountDownLatch responseLatch = new CountDownLatch(MESSAGES_BEFORE_CANCEL); final CountDownLatch finishedLatch = new CountDownLatch(1);
final List<ProtocolWaveletUpdate> responses = Lists.newArrayList(); final ProtocolWaveletUpdate cannedResponse = ProtocolWaveletUpdate.newBuilder().setWaveletName(WAVE).build();
final List<ProtocolWaveletUpdate> responses = Lists.newArrayList(); final ProtocolWaveletUpdate cannedResponse = ProtocolWaveletUpdate.newBuilder().setWaveletName(WAVE).build();
@Override public void run(ProtocolWaveletUpdate update) { ++counter; assertEquals(WAVELET_NAME, getWaveletName(update.getWaveletName())); assertTrue(update.hasCommitNotice()); assertEquals(BEGIN_VERSION, CoreWaveletOperationSerializer.deserialize(update.getCommitNotice())); } });
@Override public void run(ProtocolWaveletUpdate update) { ++counter; assertEquals(WAVELET_NAME, getWaveletName(update.getWaveletName())); assertEquals(DELTAS.size(), update.getAppliedDeltaCount()); for (int i = 0; i < update.getAppliedDeltaCount(); ++i) { assertEquals(DELTAS.get(i), update.getAppliedDelta(i)); } assertFalse(update.hasCommitNotice()); } });