From b011cecfe8be981db0c77612e13a36013d61ee3e Mon Sep 17 00:00:00 2001 From: RyuJongJin <266630912+RyuJongJin@users.noreply.github.com> Date: Wed, 21 Oct 2026 01:55:21 +0900 Subject: [PATCH] =?UTF-8?q?ftp=5Ftest=20FTP=20=3D=20rsync=20=EB=B9=84?= =?UTF-8?q?=EA=B5=90:=20=EC=8B=A4=ED=8C=A8=ED=95=98=EB=A9=B4=20(=EC=8B=9C?= =?UTF-8?q?=EA=B0=84=20=EC=B4=88=EA=B3=BC=20=ED=8F=AC=ED=95=A8)=20?= =?UTF-8?q?=EC=8B=9C=ED=97=98=20=ED=8F=B4=EB=8D=94=20=EB=B0=96=20%LOCALAPP?= =?UTF-8?q?DATA%\Temp\jj=5Fftp28=5Ffail=5F<=EC=8B=9C=EA=B0=81>.txt=20?= =?UTF-8?q?=EC=97=90=20=EC=A0=84=EB=B6=80=20(=EA=B4=80=EB=A6=AC=EC=9E=90?= =?UTF-8?q?=20=EC=A7=80=EC=8B=9C=2010/21)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 전체 시험 부하에서만 가끔 실패하고 콘솔 끝줄만 남아 원문을 못 잡았다 - 시험 이름 · 까닭 · 걸린 시간 · 포트 · 옵션마다 시작 · 걸린 시간 · 같음/다름 · 다른 점 · 목록 (크기 · 바뀐 시각) 을 파일로. 몸통이 시간 초과로 끊겨도 tearDown 에서 어디까지 갔는지 씀. 성공하면 쓰지 않음 - 확인: 혼자 돌려 통과 · 파일 0개 Co-Authored-By: Claude Opus 5.5 --- test/ftp_test.dart | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/ftp_test.dart b/test/ftp_test.dart index 9cf6ac2..0dd8ab8 100644 --- a/test/ftp_test.dart +++ b/test/ftp_test.dart @@ -270,8 +270,33 @@ void main() { } final sw = Stopwatch()..start(); + // 관리자 지시 (10/21): 전체 시험 부하에서만 가끔 실패 - 콘솔이 잘려도 남게, 실패하면 (시간 초과 포함) 시험 폴더 밖 + // %LOCALAPPDATA%\Temp\jj_ftp28_fail_<시각>.txt 에 시험 이름 · 옵션마다 걸린 시간 · 다른 점 · 목록을 쓴다. 성공하면 쓰지 않는다 + final progress = []; + var finished = false; + void writeFail(String why) { + final base = Platform.environment['LOCALAPPDATA']; + if (base == null || base.isEmpty) return; + final stamp = DateTime.now().toIso8601String().replaceAll(':', '').split('.').first; + try { + File(p.join(base, 'Temp', 'jj_ftp28_fail_$stamp.txt')).writeAsStringSync([ + 'ftp_test: FTP 맞추기 결과 = 실제 rsync 결과 (28 의 장면 · 옵션 28개)', + '까닭: $why · 걸린 시간 ${sw.elapsedMilliseconds}ms · 포트 $port · 끝 ${DateTime.now().toIso8601String()}', + '옵션마다:', + ...progress.map((x) => ' $x'), + '', + ...bad, + ].join('\n')); + } catch (_) {} + } + + // 시간 초과로 몸통이 끊겨도 (tearDown 은 돈다) 어디까지 갔는지 남긴다 + addTearDown(() { + if (!finished) writeFail('끝나지 않음 (시간 초과 · 예외)'); + }); for (final opts in sceneOptions) { final t0 = sw.elapsedMilliseconds; + progress.add('$opts - 시작 ${t0}ms'); writeScene(src, want); final w = await realRsyncTree(rsync, src, want, opts); final wantList = listing(want); @@ -300,7 +325,10 @@ void main() { listing(got), ].join('\n')); } + progress[progress.length - 1] += ' · ${sw.elapsedMilliseconds - t0}ms · ${d.isEmpty && error == null ? '같음' : '다름'}'; } + finished = true; + if (bad.isNotEmpty) writeFail('결과가 rsync 와 다름 ${bad.length}개'); expect(bad, isEmpty, reason: bad.join('\n')); }, skip: hasPy ? false : '시험용 파이썬 없음', timeout: const Timeout(Duration(minutes: 5)));