ftp_test FTP = rsync 비교: 실패하면 (시간 초과 포함) 시험 폴더 밖 %LOCALAPPDATA%\Temp\jj_ftp28_fail_<시각>.txt 에 전부 (관리자 지시 10/21)

- 전체 시험 부하에서만 가끔 실패하고 콘솔 끝줄만 남아 원문을 못 잡았다 - 시험 이름 · 까닭 · 걸린 시간 · 포트 · 옵션마다 시작 · 걸린 시간 · 같음/다름 ·
  다른 점 · 목록 (크기 · 바뀐 시각) 을 파일로. 몸통이 시간 초과로 끊겨도 tearDown 에서 어디까지 갔는지 씀. 성공하면 쓰지 않음
- 확인: 혼자 돌려 통과 · 파일 0개

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rc2
RyuJongJin 2026-10-21 01:55:21 +09:00
parent d745324ca2
commit b011cecfe8
1 changed files with 28 additions and 0 deletions

View File

@ -270,8 +270,33 @@ void main() {
} }
final sw = Stopwatch()..start(); final sw = Stopwatch()..start();
// 관리자 지시 (10/21): 전체 시험 부하에서만 가끔 실패 - 콘솔이 잘려도 남게, 실패하면 (시간 초과 포함) 시험 폴더 밖
// %LOCALAPPDATA%\Temp\jj_ftp28_fail_<시각>.txt 에 시험 이름 · 옵션마다 걸린 시간 · 다른 점 · 목록을 쓴다. 성공하면 쓰지 않는다
final progress = <String>[];
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) { for (final opts in sceneOptions) {
final t0 = sw.elapsedMilliseconds; final t0 = sw.elapsedMilliseconds;
progress.add('$opts - 시작 ${t0}ms');
writeScene(src, want); writeScene(src, want);
final w = await realRsyncTree(rsync, src, want, opts); final w = await realRsyncTree(rsync, src, want, opts);
final wantList = listing(want); final wantList = listing(want);
@ -300,7 +325,10 @@ void main() {
listing(got), listing(got),
].join('\n')); ].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')); expect(bad, isEmpty, reason: bad.join('\n'));
}, skip: hasPy ? false : '시험용 파이썬 없음', timeout: const Timeout(Duration(minutes: 5))); }, skip: hasPy ? false : '시험용 파이썬 없음', timeout: const Timeout(Duration(minutes: 5)));