- Expand batch upload list area and optimize preview image layout - Improve upload speed tracking and display (server-side & client-side) - Reduce network detection log noise - Optimize Docker build process (caching, env validation) - Add shadow environment deployment support
54 lines
1.5 KiB
TypeScript
54 lines
1.5 KiB
TypeScript
/**
|
||
* R6 测试:S3 连接配置优化
|
||
*
|
||
* 验证:
|
||
* 1. maxAttempts 降低到合理值(5次)
|
||
* 2. 保留 adaptive 重试模式
|
||
* 3. 有超时配置
|
||
*/
|
||
|
||
describe('R6: S3 连接配置优化', () => {
|
||
it('maxAttempts 应该是 5(不是 10)', () => {
|
||
const fs = require('fs')
|
||
const path = require('path')
|
||
const s3Path = path.join(__dirname, '..', 's3.ts')
|
||
const content = fs.readFileSync(s3Path, 'utf-8')
|
||
|
||
// 验证 maxAttempts 配置
|
||
expect(content).toContain('maxAttempts: 5')
|
||
// 确保不是旧的 10 次配置
|
||
expect(content).not.toMatch(/maxAttempts:\s*10\s*[,}]/)
|
||
})
|
||
|
||
it('应该使用 adaptive 重试模式', () => {
|
||
const fs = require('fs')
|
||
const path = require('path')
|
||
const s3Path = path.join(__dirname, '..', 's3.ts')
|
||
const content = fs.readFileSync(s3Path, 'utf-8')
|
||
|
||
// 验证重试模式
|
||
expect(content).toContain("retryMode: 'adaptive'")
|
||
})
|
||
|
||
it('应该有请求超时配置', () => {
|
||
const fs = require('fs')
|
||
const path = require('path')
|
||
const s3Path = path.join(__dirname, '..', 's3.ts')
|
||
const content = fs.readFileSync(s3Path, 'utf-8')
|
||
|
||
// 验证超时配置
|
||
expect(content).toContain('requestTimeout')
|
||
expect(content).toContain('connectionTimeout')
|
||
})
|
||
|
||
it('应该有 R6 修复说明', () => {
|
||
const fs = require('fs')
|
||
const path = require('path')
|
||
const s3Path = path.join(__dirname, '..', 's3.ts')
|
||
const content = fs.readFileSync(s3Path, 'utf-8')
|
||
|
||
// 验证有修复说明
|
||
expect(content).toContain('R6修复')
|
||
})
|
||
})
|