Skip to content

Commit

Permalink
fix(upsert-edge-list): await the transaction.commit
Browse files Browse the repository at this point in the history
transaction.commit was not being awaited causing random timing failures in the specs
  • Loading branch information
vespertilian committed Apr 27, 2019
1 parent 7f58bfe commit 55b4286
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/upsert-edge-list/upsert-edge-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export async function xUpsertEdgeListCommitTxn(upsertFn: (input?: any) => IUpser

try {
result = await xUpsertEdgeList(upsertFn, upsertNode, nodes, transaction, _dgraph);
transaction.commit();
await transaction.commit();
}
catch(e) {
error = e;
Expand Down

0 comments on commit 55b4286

Please sign in to comment.