Selaa lähdekoodia

fix(test): Commit post global_search.sync_global_search

This is an attempt to tackle the flaky test_delete_doc test. Not sure if
this will do anything but the other tests seem to be having a commit
directly after the sync...so following that here.

If this works, the goal would be to find a way to get rid of the commits
altogether. Since the flaky test can't be replicated locally, let's see
if this works !!!!
version-14
Gavin D'souza 3 vuotta sitten
vanhempi
commit
179f61b2e1
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. +2
    -1
      frappe/tests/test_global_search.py

+ 2
- 1
frappe/tests/test_global_search.py Näytä tiedosto

@@ -1,4 +1,4 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE

import unittest
@@ -89,6 +89,7 @@ class TestGlobalSearch(unittest.TestCase):

frappe.delete_doc('Event', event_name)
global_search.sync_global_search()
frappe.db.commit()

results = global_search.search(test_subject)
self.assertTrue(all(r["name"] != event_name for r in results), msg="Deleted documents appearing in global search.")


Ladataan…
Peruuta
Tallenna