Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/sshscript/unittest/test_command_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,13 @@ def test_capture_is_bounded_and_queue_overflow_visible(self):
list(job.iter_stdout())

def test_large_stderr_drained_on_ssh(self):
result = self.remote()(self.command('import sys; sys.stderr.write("y"*3_000_000); print("done")'), command_timeout=5, capture_limit=100)
# Exercise draining beyond the 32 KiB SSH window, not runner throughput.
# Leave scheduling headroom on loaded macOS CI; a deadlock still times out.
result = self.remote()(self.command('import sys; sys.stderr.write("y"*3_000_000); print("done")'), command_timeout=30, capture_limit=100)
self.assertEqual(result.stdout, 'done\n')
self.assertEqual(result.stderr, 'y' * 100)
self.assertTrue(result.stderr_truncated)
self.assertEqual(result.exitcode, 0)

def test_local_input_env_and_utf8_stream(self):
with self.local().start(self.command('import os,sys; print(os.environ["JOB_TEST"]); print(sys.stdin.read())'), input='中文', env={'JOB_TEST': 'yes'}) as job:
Expand Down
Loading