From 65098287e87fcb4add67aaf65d10b6625c3655e4 Mon Sep 17 00:00:00 2001 From: RyuJongJin <266630912+RyuJongJin@users.noreply.github.com> Date: Tue, 20 Oct 2026 18:34:31 +0900 Subject: [PATCH] =?UTF-8?q?=EC=8B=9C=ED=97=98:=20remote=5Fidle=5Ftest=20?= =?UTF-8?q?=ED=9D=94=EB=93=A4=EB=A6=BC=20=EA=B3=A0=EC=B9=A8=EC=9D=84=20rc?= =?UTF-8?q?=5Fnext=20f43f067=20=EC=97=90=EC=84=9C=20=EA=B0=80=EC=A0=B8?= =?UTF-8?q?=EC=98=B4=20(slow()=200.1=EC=B4=88=20=EA=B0=84=EA=B2=A9=20?= =?UTF-8?q?=C2=B7=203=EC=B4=88=20=EC=A0=9C=ED=95=9C,=20SFTP=20=EC=A4=80?= =?UTF-8?q?=EB=B9=84=20=EB=8B=A8=EA=B3=84=2010=EC=B4=88=20-=2015,=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EB=B3=80=EA=B2=BD=20=EC=97=86=EC=9D=8C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- test/remote_idle_test.dart | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/remote_idle_test.dart b/test/remote_idle_test.dart index 2413193..b82a876 100644 --- a/test/remote_idle_test.dart +++ b/test/remote_idle_test.dart @@ -154,15 +154,15 @@ void main() { expect(t, lessThan(const Duration(seconds: 5))); expect(cut, isTrue); await c.close(); - // 0.4초마다 조각 (정한 1초 안) - 끝까지 + // 0.1초마다 조각 (정한 3초 안 - 전체 시험의 부하에서도 넉넉하게, 0b 지적 10/20: 0.4초 대 1초는 한 번 넘음) - 끝까지 Stream> slow() async* { for (var i = 0; i < 5; i++) { - await Future.delayed(const Duration(milliseconds: 400)); + await Future.delayed(const Duration(milliseconds: 100)); yield [i]; } } - expect(await idleRead(slow()).length, 5); + expect(await idleRead(slow(), limit: const Duration(seconds: 3)).length, 5); }); test('도우미: 올리기 - 보내는 쪽이 더 가져가지 않으면 · 다 가져간 뒤 답이 없으면 실패', () async { @@ -297,8 +297,11 @@ void main() { test('받는 중에 서버가 멈추면 · 명령 (열기) 에 답이 없으면 정한 시간 뒤 실패', () async { final c = client(); addTearDown(c.close); + // 준비 (연결 · 목록 · 열기) 는 넉넉하게 - 함께 도는 시험의 부하에서 paramiko 의 답이 1초를 넘은 적이 있다 (15 검증 10/20) + RemoteIdle.limit = const Duration(seconds: 10); expect((await c.list('/')).map((e) => e.rel), contains('/a.bin')); final s = await c.openReadFrom('a.bin'); // 열기까지는 됨 + RemoteIdle.limit = const Duration(seconds: 1); // 받기 (listen) 때 이 시간으로 proxy!.stall = true; // 이제 서버가 아무것도 보내지 않음 final (t, e) = await _timed(() => s.drain()); expect(e, isA(), reason: '$e'); @@ -306,7 +309,9 @@ void main() { final c2 = client(); addTearDown(c2.close); proxy!.stall = false; + RemoteIdle.limit = const Duration(seconds: 10); await c2.list('/'); + RemoteIdle.limit = const Duration(seconds: 1); proxy!.stall = true; final (t2, e2) = await _timed(() => c2.openReadFrom('a.bin')); expect(e2, isA(), reason: '$e2'); @@ -316,7 +321,9 @@ void main() { test('올리는 중에 서버가 멈추면 정한 시간 뒤 실패', () async { final c = client(); addTearDown(c.close); + RemoteIdle.limit = const Duration(seconds: 10); // 준비는 넉넉하게 (위와 같음) await c.list('/'); + RemoteIdle.limit = const Duration(seconds: 1); proxy!.stall = true; final (t, e) = await _timed(() => c.write('b.bin', _big())); expect(e, isA(), reason: '$e');