시험 흔들림: remote_idle_test - "조각이 계속 오면 실패하지 않음" 은 0.1초 간격 · 3초 제한, SFTP 의 준비 (연결 · 목록 · 열기) 는 10초 (검토 대기)
0b 지적 (10/20): next10 전체 시험 (10분 넘음) 의 부하에서 0.4초 간격 대 1초 제한이 한 번 넘어 "서버가 답하지 않습니다 (1초)" 로 실패 (혼자서는 통과) - 여유를 30배로. 15 검증 (wt_verify_d3): 시험 다섯 파일을 함께 돌릴 때 SFTP 멈춤 시험의 준비 단계 (아직 멈추지 않은 list) 가 paramiko 의 답이 늦어 1초에 걸림 - 준비는 10초로 두고 멈추게 하기 바로 전에 1초로. 끊기는 쪽 확인은 그대로 1초. 코드 변경 없음. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>next11
parent
ed459a0229
commit
f43f067d4b
|
|
@ -154,15 +154,15 @@ void main() {
|
||||||
expect(t, lessThan(const Duration(seconds: 5)));
|
expect(t, lessThan(const Duration(seconds: 5)));
|
||||||
expect(cut, isTrue);
|
expect(cut, isTrue);
|
||||||
await c.close();
|
await c.close();
|
||||||
// 0.4초마다 조각 (정한 1초 안) - 끝까지
|
// 0.1초마다 조각 (정한 3초 안 - 전체 시험의 부하에서도 넉넉하게, 0b 지적 10/20: 0.4초 대 1초는 한 번 넘음) - 끝까지
|
||||||
Stream<List<int>> slow() async* {
|
Stream<List<int>> slow() async* {
|
||||||
for (var i = 0; i < 5; i++) {
|
for (var i = 0; i < 5; i++) {
|
||||||
await Future<void>.delayed(const Duration(milliseconds: 400));
|
await Future<void>.delayed(const Duration(milliseconds: 100));
|
||||||
yield [i];
|
yield [i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
expect(await idleRead(slow()).length, 5);
|
expect(await idleRead(slow(), limit: const Duration(seconds: 3)).length, 5);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('도우미: 올리기 - 보내는 쪽이 더 가져가지 않으면 · 다 가져간 뒤 답이 없으면 실패', () async {
|
test('도우미: 올리기 - 보내는 쪽이 더 가져가지 않으면 · 다 가져간 뒤 답이 없으면 실패', () async {
|
||||||
|
|
@ -297,8 +297,11 @@ void main() {
|
||||||
test('받는 중에 서버가 멈추면 · 명령 (열기) 에 답이 없으면 정한 시간 뒤 실패', () async {
|
test('받는 중에 서버가 멈추면 · 명령 (열기) 에 답이 없으면 정한 시간 뒤 실패', () async {
|
||||||
final c = client();
|
final c = client();
|
||||||
addTearDown(c.close);
|
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'));
|
expect((await c.list('/')).map((e) => e.rel), contains('/a.bin'));
|
||||||
final s = await c.openReadFrom('a.bin'); // 열기까지는 됨
|
final s = await c.openReadFrom('a.bin'); // 열기까지는 됨
|
||||||
|
RemoteIdle.limit = const Duration(seconds: 1); // 받기 (listen) 때 이 시간으로
|
||||||
proxy!.stall = true; // 이제 서버가 아무것도 보내지 않음
|
proxy!.stall = true; // 이제 서버가 아무것도 보내지 않음
|
||||||
final (t, e) = await _timed(() => s.drain<void>());
|
final (t, e) = await _timed(() => s.drain<void>());
|
||||||
expect(e, isA<RemoteIdleTimeout>(), reason: '$e');
|
expect(e, isA<RemoteIdleTimeout>(), reason: '$e');
|
||||||
|
|
@ -306,7 +309,9 @@ void main() {
|
||||||
final c2 = client();
|
final c2 = client();
|
||||||
addTearDown(c2.close);
|
addTearDown(c2.close);
|
||||||
proxy!.stall = false;
|
proxy!.stall = false;
|
||||||
|
RemoteIdle.limit = const Duration(seconds: 10);
|
||||||
await c2.list('/');
|
await c2.list('/');
|
||||||
|
RemoteIdle.limit = const Duration(seconds: 1);
|
||||||
proxy!.stall = true;
|
proxy!.stall = true;
|
||||||
final (t2, e2) = await _timed(() => c2.openReadFrom('a.bin'));
|
final (t2, e2) = await _timed(() => c2.openReadFrom('a.bin'));
|
||||||
expect(e2, isA<RemoteIdleTimeout>(), reason: '$e2');
|
expect(e2, isA<RemoteIdleTimeout>(), reason: '$e2');
|
||||||
|
|
@ -316,7 +321,9 @@ void main() {
|
||||||
test('올리는 중에 서버가 멈추면 정한 시간 뒤 실패', () async {
|
test('올리는 중에 서버가 멈추면 정한 시간 뒤 실패', () async {
|
||||||
final c = client();
|
final c = client();
|
||||||
addTearDown(c.close);
|
addTearDown(c.close);
|
||||||
|
RemoteIdle.limit = const Duration(seconds: 10); // 준비는 넉넉하게 (위와 같음)
|
||||||
await c.list('/');
|
await c.list('/');
|
||||||
|
RemoteIdle.limit = const Duration(seconds: 1);
|
||||||
proxy!.stall = true;
|
proxy!.stall = true;
|
||||||
final (t, e) = await _timed(() => c.write('b.bin', _big()));
|
final (t, e) = await _timed(() => c.write('b.bin', _big()));
|
||||||
expect(e, isA<RemoteIdleTimeout>(), reason: '$e');
|
expect(e, isA<RemoteIdleTimeout>(), reason: '$e');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue