Open MeirShpilraien opened 4 years ago
def testMod_309_with_cursor_del_before_read_the_cursor(env): env.expect('FT.CREATE', 'idx', 'ON', 'HASH', 'SCHEMA', 'test', 'TEXT', 'SORTABLE').equal('OK') for i in range(100000): env.expect('FT.ADD', 'idx', 'doc%d'%i, '1.0', 'FIELDS', 'test', 'foo').equal('OK') res = env.cmd('FT.AGGREGATE', 'idx', 'foo', 'WITHCURSOR') cursor = res[1] for i in range(2): r, cursor = env.cmd('FT.CURSOR', 'READ', 'idx', str(cursor)) env.expect('FT.DROP', 'idx').equal('OK') res = env.cmd('FT.CURSOR', 'READ', 'idx', str(cursor)) print(res)