Skip to content

Commit

Permalink
Bump setuptools from 67.7.2 to 75.6.0 (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Nov 28, 2024
1 parent c4f8ad8 commit 44d00b2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/ci-pydgraph-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,23 @@ jobs:
name: pydgraph-tests
runs-on: ubuntu-20.04
steps:
- name: Checkout Dgraph repo # needed for acl tests
uses: actions/checkout@v4
with:
path: dgraph
repository: dgraph-io/dgraph
ref: main
- name: Checkout pydgraph repo
uses: actions/checkout@v4
with:
path: pydgraph
repository: dgraph-io/pydgraph
ref: ${{ github.ref }}
- name: Checkout Dgraph repo # needed for acl tests
uses: actions/checkout@v4
with:
path: dgraph
repository: dgraph-io/dgraph
ref: main
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
go-version-file: dgraph/go.mod
- name: Build dgraph binary
run: cd dgraph && make docker-image # also builds dgraph binary
- name: Move dgraph binary to gopath
run: cd dgraph && mv dgraph/dgraph ~/go/bin/dgraph
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools==67.7.2"]
requires = ["setuptools==75.6.0"]
build-backend = "setuptools.build_meta"

[project]
Expand Down
20 changes: 11 additions & 9 deletions tests/test_txn.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,28 +265,30 @@ def test_best_effort_txn(self):
helper.drop_all(self.client)
helper.set_schema(self.client, 'name: string @index(exact) .')

with self.assertRaises(Exception):
self.client.txn(read_only=False, best_effort=True)

query = '{ me(func: has(name)) {name} }'
rtxn = self.client.txn(read_only=True, best_effort=True)
resp = rtxn.query(query)
self.assertEqual([], json.loads(resp.json).get('me'))

txn = self.client.txn()
resp = txn.mutate(set_obj={'name': 'Manish'})
txn.commit()
mu_ts = resp.txn.commit_ts

query = '{ me(func: has(name)) {name} }'
with self.assertRaises(Exception):
self.client.txn(read_only=False, best_effort=True)
resp = rtxn.query(query)
self.assertEqual([], json.loads(resp.json).get('me'))

while True:
txn = self.client.txn(read_only=True, best_effort=True)
resp = txn.query(query)
if resp.txn.start_ts < mu_ts:
continue
self.assertEqual([], json.loads(resp.json).get('me'))
self.assertEqual([{'name': 'Manish'}], json.loads(resp.json).get('me'))
break

with self.assertRaises(Exception):
txn.mutate(set_obj={'name': 'Manish'})
with self.assertRaises(Exception):
txn.commit()

def test_conflict(self):
"""Tests committing two transactions which conflict."""

Expand Down

0 comments on commit 44d00b2

Please sign in to comment.