From 6c4a70c0d605aefab8e691bf6a846bbc70f899e0 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Wed, 3 Apr 2024 15:20:35 +0200 Subject: [PATCH] increase sleep ffs --- tests/helpers.py | 25 ------------------------- tests/test_mint_regtest.py | 4 ++-- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/tests/helpers.py b/tests/helpers.py index 9db520f0..fa772bac 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -157,31 +157,6 @@ def pay_onchain(address: str, sats: int) -> str: return run_cmd(cmd) -# def clean_database(settings): -# if DB_TYPE == POSTGRES: -# db_url = make_url(settings.lnbits_database_url) - -# conn = psycopg2.connect(settings.lnbits_database_url) -# conn.autocommit = True -# with conn.cursor() as cur: -# try: -# cur.execute("DROP DATABASE lnbits_test") -# except psycopg2.errors.InvalidCatalogName: -# pass -# cur.execute("CREATE DATABASE lnbits_test") - -# db_url.database = "lnbits_test" -# settings.lnbits_database_url = str(db_url) - -# core.db.__init__("database") - -# conn.close() -# else: -# # FIXME: do this once mock data is removed from test data folder -# # os.remove(settings.lnbits_data_folder + "/database.sqlite3") -# pass - - def pay_if_regtest(bolt11: str): if is_regtest: pay_real_invoice(bolt11) diff --git a/tests/test_mint_regtest.py b/tests/test_mint_regtest.py index 82890e46..0e61faa2 100644 --- a/tests/test_mint_regtest.py +++ b/tests/test_mint_regtest.py @@ -52,7 +52,7 @@ async def test_regtest_pending_quote(wallet: Wallet, ledger: Ledger): quote_id=quote.quote, ) ) - await asyncio.sleep(SLEEP_TIME) + await asyncio.sleep(SLEEP_TIME * 3) # settle_invoice(preimage=preimage) # expect that melt quote is still pending @@ -67,7 +67,7 @@ async def test_regtest_pending_quote(wallet: Wallet, ledger: Ledger): # only now settle the invoice settle_invoice(preimage=preimage) - await asyncio.sleep(SLEEP_TIME) + await asyncio.sleep(SLEEP_TIME * 3) # expect that proofs are now spent states = await ledger.check_proofs_state([p.Y for p in send_proofs])