Created
February 9, 2015 22:56
-
-
Save tahmmee/6c47aec29f9ed1f167a8 to your computer and use it in GitHub Desktop.
sample repro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_stream_request_MB_13286(self): | |
dcp_client2 = DcpClient(self.host, self.port) | |
doc_count = 100 | |
# load docs | |
for i in range(doc_count): | |
self.mcd_client.set('key' + str(i), 0, 0, 'value', 0) | |
self.dcp_client = DcpClient(self.host, self.port) | |
response = self.dcp_client.open_producer("producer") | |
assert response['status'] == SUCCESS | |
stream = self.dcp_client.stream_req(0, 0, 0, doc_count, 0) | |
assert stream.status == SUCCESS | |
# stream 1/2 docs | |
response = dcp_client2.open_producer("producer") | |
for i in range(doc_count/2): | |
resp = stream.next_response() | |
print resp | |
# expecting no-op | |
if 'status' in resp and resp['status'] != SUCCESS: | |
import pdb; pdb.set_trace() | |
#assert resp['status'] == SUCCESS | |
# stream remaining with new connection | |
stream = dcp_client2.stream_req(0, 0, 0, doc_count, 0) | |
assert stream.status == SUCCESS | |
stream.run() | |
assert stream.last_by_seqno == doc_count | |
dcp_client2.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment