Skip to content

Commit

Permalink
tests: with coop settle we should not expect closed events anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Stanković authored and istankovic committed Aug 30, 2021
1 parent a56b66b commit 1e2ca6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 26 deletions.
14 changes: 5 additions & 9 deletions raiden/tests/integration/api/test_pythonapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
RaidenRecoverableError,
SamePeerAddress,
TokenNotRegistered,
UnexpectedChannelState,
UnknownTokenAddress,
)
from raiden.raiden_service import RaidenService
Expand Down Expand Up @@ -724,14 +723,11 @@ def test_raidenapi_channel_lifecycle(

api1.channel_close(registry_address, token_address, api2.address)

# Load the new state with the channel closed
channel12 = get_channelstate(app1, app2, token_network_address)
assert channel.get_status(channel12) == ChannelState.STATE_CLOSED

with pytest.raises(UnexpectedChannelState):
api1.set_total_channel_deposit(
registry_address, token_address, api2.address, deposit + 100
)
# Make sure that there is no channel anymore, since we coop settled.
channel_state = views.get_channelstate_by_token_network_and_partner(
views.state_from_raiden(app1), token_network_address, app2.address
)
assert channel_state is None

assert wait_for_state_change(
app1,
Expand Down
17 changes: 0 additions & 17 deletions raiden/tests/integration/long_running/test_integration_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,23 +362,6 @@ def test_query_events(
contract_manager=app0.contract_manager,
)

closed_events = get_netting_channel_closed_events(
proxy_manager=app0.proxy_manager,
token_network_address=token_network_address,
netting_channel_identifier=channel_id,
contract_manager=contract_manager,
)

closed_event = {
"event": ChannelEvent.CLOSED,
"args": {
"channel_identifier": channel_id,
"closing_participant": to_checksum_address(app0.address),
},
}
assert must_have_event(closed_events, closed_event)
assert must_have_event(all_netting_channel_events, closed_event)

settle_expiration = app0.rpc_client.block_number() + settle_timeout + 5
app0.proxy_manager.client.wait_until_block(target_block_number=settle_expiration)

Expand Down

0 comments on commit 1e2ca6c

Please sign in to comment.