Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
fix force payment concent integration test (#4989)
Browse files Browse the repository at this point in the history
* fix force payment concent integration test

* don't send `SystemExit` and `Exit` to sentry in any case
* don't try to freeze raven's time calls

* fix logging
  • Loading branch information
shadeofblue authored and jiivan committed Dec 11, 2019
1 parent f647110 commit 5dc6b51
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
5 changes: 5 additions & 0 deletions golem/ethereum/incomeskeeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ def update_overdue_incomes() -> None:
return

for income in incomes:
logger.debug(
"Marking payment as overdue. sender=%s, amount=%s",
income.wallet_operation.sender_address,
income.wallet_operation.amount,
)
income.wallet_operation.status = \
model.WalletOperation.STATUS.overdue
income.wallet_operation.save()
Expand Down
4 changes: 3 additions & 1 deletion loggingconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@
'level': 'ERROR',
'class': 'golem.tools.customloggers.SwitchedSentryHandler',
'dsn': 'https://cdf4218c9dd24aa6adeb76ad0c990c9b:e6922bfaff9f49ccaa22ae4e406354aa@talkback.golem.network/2', # noqa pylint: disable=line-too-long
'ignore_exceptions': ['SystemExit', 'Exit'],
},
'sentry-metrics': {
'level': 'DEBUG',
'class': 'golem.tools.customloggers.SwitchedSentryHandler',
'filters': ['sentry-metrics'],
'dsn': 'https://d0e50b89f1ef4794a4b7f82b06fbe1e7:1043fecec0db4b818ccf76eb03003d03@talkback.golem.network/5' # noqa pylint: disable=line-too-long
'dsn': 'https://d0e50b89f1ef4794a4b7f82b06fbe1e7:1043fecec0db4b818ccf76eb03003d03@talkback.golem.network/5', # noqa pylint: disable=line-too-long
'ignore_exceptions': ['SystemExit', 'Exit'],
},
},
'root': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@

from golemapp import main # noqa: E402 module level import not at top of file

with freezegun.freeze_time(helpers.yesterday(), tick=True):
with freezegun.freeze_time(helpers.yesterday(), tick=True, ignore=['raven']):
main()
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from golemapp import main # noqa: E402 module level import not at top of file


with freezegun.freeze_time(helpers.yesterday(), tick=True):
with freezegun.freeze_time(helpers.yesterday(), tick=True, ignore=['raven']):
with mock.patch(
'golem.ethereum.paymentprocessor.PaymentProcessor.sendout',
mock.Mock(return_value=True),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@
class ConcentTestConfigBase(TestConfigBase):
def __init__(self):
super().__init__()
for node_config in self.nodes.values():
self.enable_concent()

def enable_concent(self):
node_configs = []
for n in self.nodes.values():
node_configs.extend(
n if isinstance(n, list) else [n]
)
for node_config in node_configs:
node_config.concent = CONCENT_STAGING
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ def __init__(self):
provider_config,
provider_config_2,
]
self.enable_concent()

0 comments on commit 5dc6b51

Please sign in to comment.