Skip to content

Commit

Permalink
more sleep for github sigh
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Apr 3, 2024
1 parent 704caea commit 514828b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
5 changes: 5 additions & 0 deletions cashu/mint/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
from ..mint.crud import LedgerCrudSqlite
from ..mint.ledger import Ledger

# kill the program if python runs in non-__debug__ mode
# which could lead to asserts not being executed for optimized code
if not __debug__:
raise Exception("Nutshell cannot run in non-debug mode.")

logger.debug("Enviroment Settings:")
for key, value in settings.dict().items():
if key in [
Expand Down
1 change: 1 addition & 0 deletions tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ async def get_random_invoice_data():
is_deprecated_api_only = settings.debug_mint_only_deprecated
is_github_actions = os.getenv("GITHUB_ACTIONS") == "true"
is_postgres = settings.mint_database.startswith("postgres")
SLEEP_TIME = 1 if not is_github_actions else 3

docker_lightning_cli = [
"docker",
Expand Down
3 changes: 1 addition & 2 deletions tests/test_mint_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
from cashu.wallet.wallet import Wallet
from tests.conftest import SERVER_ENDPOINT
from tests.helpers import (
SLEEP_TIME,
cancel_invoice,
get_hold_invoice,
is_fake,
is_github_actions,
is_regtest,
pay_if_regtest,
settle_invoice,
Expand All @@ -27,7 +27,6 @@
DERIVATION_PATH = "m/0'/0'/0'"
DECRYPTON_KEY = "testdecryptionkey"
ENCRYPTED_SEED = "U2FsdGVkX1_7UU_-nVBMBWDy_9yDu4KeYb7MH8cJTYQGD4RWl82PALH8j-HKzTrI"
SLEEP_TIME = 1 if not is_github_actions else 2


async def assert_err(f, msg):
Expand Down
4 changes: 1 addition & 3 deletions tests/test_mint_regtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@
from cashu.wallet.wallet import Wallet
from tests.conftest import SERVER_ENDPOINT
from tests.helpers import (
SLEEP_TIME,
get_hold_invoice,
is_fake,
is_github_actions,
pay_if_regtest,
settle_invoice,
)

SLEEP_TIME = 1 if not is_github_actions else 2


@pytest_asyncio.fixture(scope="function")
async def wallet():
Expand Down
4 changes: 1 addition & 3 deletions tests/test_wallet_regtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@
from cashu.wallet.wallet import Wallet
from tests.conftest import SERVER_ENDPOINT
from tests.helpers import (
SLEEP_TIME,
cancel_invoice,
get_hold_invoice,
is_fake,
is_github_actions,
pay_if_regtest,
settle_invoice,
)

SLEEP_TIME = 1 if not is_github_actions else 2


@pytest_asyncio.fixture(scope="function")
async def wallet():
Expand Down

0 comments on commit 514828b

Please sign in to comment.