mirror of
https://github.com/esphome/esphome.git
synced 2025-10-12 23:03:46 +01:00
Merge remote-tracking branch 'upstream/dev' into integration
This commit is contained in:
@@ -15,7 +15,7 @@ async def test_oversized_payload_plaintext(
|
|||||||
run_compiled: RunCompiledFunction,
|
run_compiled: RunCompiledFunction,
|
||||||
api_client_connected_with_disconnect: APIClientConnectedWithDisconnectFactory,
|
api_client_connected_with_disconnect: APIClientConnectedWithDisconnectFactory,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test that oversized payloads (>2304 bytes) from client cause disconnection without crashing."""
|
"""Test that oversized payloads (>32768 bytes) from client cause disconnection without crashing."""
|
||||||
process_exited = False
|
process_exited = False
|
||||||
helper_log_found = False
|
helper_log_found = False
|
||||||
|
|
||||||
@@ -39,8 +39,8 @@ async def test_oversized_payload_plaintext(
|
|||||||
assert device_info is not None
|
assert device_info is not None
|
||||||
assert device_info.name == "oversized-plaintext"
|
assert device_info.name == "oversized-plaintext"
|
||||||
|
|
||||||
# Create an oversized payload (>2304 bytes which is our new limit)
|
# Create an oversized payload (>32768 bytes which is our new limit)
|
||||||
oversized_data = b"X" * 3000 # ~3KiB, exceeds the 2304 byte limit
|
oversized_data = b"X" * 40000 # ~40KiB, exceeds the 32768 byte limit
|
||||||
|
|
||||||
# Access the internal connection to send raw data
|
# Access the internal connection to send raw data
|
||||||
frame_helper = client._connection._frame_helper
|
frame_helper = client._connection._frame_helper
|
||||||
@@ -161,8 +161,8 @@ async def test_oversized_payload_noise(
|
|||||||
assert device_info is not None
|
assert device_info is not None
|
||||||
assert device_info.name == "oversized-noise"
|
assert device_info.name == "oversized-noise"
|
||||||
|
|
||||||
# Create an oversized payload (>32Kbytes which is our new limit)
|
# Create an oversized payload (>32768 bytes which is our new limit)
|
||||||
oversized_data = b"Y" * 32769 # ~32KiB, exceeds the 32 Kbyte limit
|
oversized_data = b"Y" * 40000 # ~40KiB, exceeds the 32768 byte limit
|
||||||
|
|
||||||
# Access the internal connection to send raw data
|
# Access the internal connection to send raw data
|
||||||
frame_helper = client._connection._frame_helper
|
frame_helper = client._connection._frame_helper
|
||||||
|
Reference in New Issue
Block a user