Skip to content

Commit

Permalink
Fix read-index-after-write test case.
Browse files Browse the repository at this point in the history
This test case to read-index-after-write within the same txn is no longer valid. See dgraph-io/dgraph#2678
  • Loading branch information
danielmai committed Dec 13, 2018
1 parent 3a84ea7 commit 8f9406e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_txn.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,9 @@ def test_conflict_ignore(self):
self.assertEqual([{'uid': uid1}, {'uid': uid2}], json.loads(resp.json).get('me'))

def test_read_index_key_same_txn(self):
"""Tests reading an indexed field within a transaction."""
"""Tests reading an indexed field within a transaction. The read
should return the results from before any writes of the same
txn."""

helper.drop_all(self.client)
helper.set_schema(self.client, 'name: string @index(exact) .')
Expand All @@ -382,7 +384,8 @@ def test_read_index_key_same_txn(self):
}"""

resp = txn.query(query)
self.assertEqual([{'uid': uid}], json.loads(resp.json).get('me'))
self.assertEqual([], json.loads(resp.json).get('me'),
"Expected 0 nodes read from index")


class TestSPStar(helper.ClientIntegrationTestCase):
Expand Down

0 comments on commit 8f9406e

Please sign in to comment.