/** * Removes a thread from the manifest, as though a remote client had done so. */ private void remoteRemoveThread(WaveletBasedConversationThread thread) { ManifestBlip parentBlip = thread.getParentBlip().getManifestBlip(); ManifestThread manifestThread = thread.getManifestThread(); parentBlip.removeReply(manifestThread); }
/** * Removes a thread from the manifest, as though a remote client had done so. */ private void remoteRemoveThread(WaveletBasedConversationThread thread) { ManifestBlip parentBlip = thread.getParentBlip().getManifestBlip(); ManifestThread manifestThread = thread.getManifestThread(); parentBlip.removeReply(manifestThread); }
public void testRemoveRestoreThreadAfterObsoleteThreadDoesntDie() { WaveletBasedConversationBlip first = target.getRootThread().appendBlip(); WaveletBasedConversationThread reply11 = first.addReplyThread(); ConversationBlip blip1 = reply11.appendBlip(); String blip1Id = blip1.getId(); WaveletBasedConversationThread reply2 = first.addReplyThread(); // Make first thread empty by removing its blip. ManifestBlip manifestRootBlip = target.getManifest().getRootThread().getBlip(0); ManifestThread manifestReply1 = manifestRootBlip.getReply(0); manifestReply1.removeBlip(manifestReply1.getBlip(0)); assertThreadValid(reply11); // Remove and re-add second thread, as can happen in playback. String thread2Id = reply2.getId(); ManifestThread manifestReply2 = manifestRootBlip.getReply(1); manifestRootBlip.removeReply(manifestReply2); manifestRootBlip.appendReply(thread2Id, false); assertThreadInvalid(reply2); }
public void testRemoveRestoreThreadAfterObsoleteThreadDoesntDie() { WaveletBasedConversationBlip first = target.getRootThread().appendBlip(); WaveletBasedConversationThread reply11 = first.addReplyThread(); ConversationBlip blip1 = reply11.appendBlip(); String blip1Id = blip1.getId(); WaveletBasedConversationThread reply2 = first.addReplyThread(); // Make first thread empty by removing its blip. ManifestBlip manifestRootBlip = target.getManifest().getRootThread().getBlip(0); ManifestThread manifestReply1 = manifestRootBlip.getReply(0); manifestReply1.removeBlip(manifestReply1.getBlip(0)); assertThreadValid(reply11); // Remove and re-add second thread, as can happen in playback. String thread2Id = reply2.getId(); ManifestThread manifestReply2 = manifestRootBlip.getReply(1); manifestRootBlip.removeReply(manifestReply2); manifestRootBlip.appendReply(thread2Id, false); assertThreadInvalid(reply2); }