Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Commit

Permalink
#41: Adjust limits
Browse files Browse the repository at this point in the history
  • Loading branch information
blackandred committed Oct 23, 2020
1 parent 89d1cc7 commit d01af7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/rkd/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def check_call(command: str, script: Optional[str] = ''):
primary_fd, replica_fd = pty.openpty()

process = subprocess.Popen(command, shell=True, stdin=replica_fd, stdout=replica_fd, stderr=replica_fd,
bufsize=1, close_fds=ON_POSIX, universal_newlines=False, preexec_fn=os.setsid)
bufsize=64, close_fds=ON_POSIX, universal_newlines=False, preexec_fn=os.setsid)

out_buffer = TextBuffer(buffer_size=1024 * 10)
stdout_thread = Thread(target=push_output, args=(process, primary_fd, out_buffer))
Expand Down
2 changes: 1 addition & 1 deletion test/test_taskutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def test_sh_producing_large_outputs(self):
memory_after = psutil.Process(os.getpid()).memory_info().rss / 1024 / 1024

self.assertEqual(iterations * text_with_newlines_length, len(out.getvalue()))
self.assertLessEqual(memory_after - memory_before, 15, msg='Expected less than 15 megabytes of memory usage')
self.assertLessEqual(memory_after - memory_before, 16, msg='Expected less than 16 megabytes of memory usage')

def test_sh_captures_output_in_correct_order_with_fixed_timing(self):
"""Test if output contains stdout and stderr lines printed out in proper order,
Expand Down

0 comments on commit d01af7b

Please sign in to comment.