refactor: improve secure-fs throttling configuration and add unit tests

- Enhanced the configureThrottling function to prevent changes to maxConcurrency while operations are in flight.
- Added comprehensive unit tests for secure-fs throttling and retry logic, ensuring correct behavior and configuration.
- Removed outdated secure-fs test file and replaced it with a new, updated version to improve test coverage.
This commit is contained in:
Kacper
2025-12-26 22:06:39 +01:00
parent 6d3314f980
commit ad983c6422
5 changed files with 151 additions and 116 deletions

View File

@@ -89,9 +89,7 @@ Binary file ${cleanPath} added
const fileSize = Number(stats.size);
if (fileSize > MAX_SYNTHETIC_DIFF_SIZE) {
const sizeKB = Math.round(fileSize / 1024);
return createNewFileDiff(relativePath, '100644', [
`[File too large to display: ${sizeKB}KB]`,
]);
return createNewFileDiff(cleanPath, '100644', [`[File too large to display: ${sizeKB}KB]`]);
}
// Read file content