mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-15 11:36:00 -05:00
test: Skip flaky p2p_invalid_messages test on macOS
This commit is contained in:
parent
4fcccdac78
commit
c3dfc91032
1 changed files with 18 additions and 10 deletions
|
@ -6,6 +6,7 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
import os
|
import os
|
||||||
import struct
|
import struct
|
||||||
|
import sys
|
||||||
|
|
||||||
from test_framework import messages
|
from test_framework import messages
|
||||||
from test_framework.mininode import P2PDataStore, NetworkThread
|
from test_framework.mininode import P2PDataStore, NetworkThread
|
||||||
|
@ -92,6 +93,11 @@ class InvalidMessagesTest(BitcoinTestFramework):
|
||||||
#
|
#
|
||||||
# Send an oversized message, ensure we're disconnected.
|
# Send an oversized message, ensure we're disconnected.
|
||||||
#
|
#
|
||||||
|
# Under macOS this test is skipped due to an unexpected error code
|
||||||
|
# returned from the closing socket which python/asyncio does not
|
||||||
|
# yet know how to handle.
|
||||||
|
#
|
||||||
|
if sys.platform != 'darwin':
|
||||||
msg_over_size = msg_unrecognized(str_data="b" * (valid_data_limit + 1))
|
msg_over_size = msg_unrecognized(str_data="b" * (valid_data_limit + 1))
|
||||||
assert len(msg_over_size.serialize()) == (msg_limit + 1)
|
assert len(msg_over_size.serialize()) == (msg_limit + 1)
|
||||||
|
|
||||||
|
@ -104,6 +110,8 @@ class InvalidMessagesTest(BitcoinTestFramework):
|
||||||
node.disconnect_p2ps()
|
node.disconnect_p2ps()
|
||||||
conn = node.add_p2p_connection(P2PDataStore())
|
conn = node.add_p2p_connection(P2PDataStore())
|
||||||
conn.wait_for_verack()
|
conn.wait_for_verack()
|
||||||
|
else:
|
||||||
|
self.log.info("Skipping test p2p_invalid_messages/1 (oversized message) under macOS")
|
||||||
|
|
||||||
#
|
#
|
||||||
# 2.
|
# 2.
|
||||||
|
|
Loading…
Add table
Reference in a new issue