Skip to content

Commit a44eb00

Browse files
committed
reduce limit to 1000
1 parent 9100377 commit a44eb00

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/modules/folder/folder.repository.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ describe('SequelizeFolderRepository', () => {
11881188

11891189
it('When folder reaches maximum file count, then it should return exact count at boundary', async () => {
11901190
const mockResult = {
1191-
file_count: '10000',
1191+
file_count: '1000',
11921192
total_size: '10000000',
11931193
max_depth: '5',
11941194
};
@@ -1199,7 +1199,7 @@ describe('SequelizeFolderRepository', () => {
11991199

12001200
const result = await repository.calculateFolderStats(folder.uuid);
12011201

1202-
expect(result.fileCount).toBe(10000);
1202+
expect(result.fileCount).toBe(1000);
12031203
expect(result.isFileCountExact).toBe(true);
12041204
});
12051205

@@ -1216,7 +1216,7 @@ describe('SequelizeFolderRepository', () => {
12161216

12171217
const result = await repository.calculateFolderStats(folder.uuid);
12181218

1219-
expect(result.fileCount).toBe(10000);
1219+
expect(result.fileCount).toBe(1000);
12201220
expect(result.isFileCountExact).toBe(false);
12211221
});
12221222

@@ -1239,7 +1239,7 @@ describe('SequelizeFolderRepository', () => {
12391239

12401240
it('When folder has deep hierarchy, then it should include files from all nested levels', async () => {
12411241
const mockResult = {
1242-
file_count: '9973',
1242+
file_count: '973',
12431243
total_size: '27634171904',
12441244
max_depth: '10',
12451245
};
@@ -1250,7 +1250,7 @@ describe('SequelizeFolderRepository', () => {
12501250

12511251
const result = await repository.calculateFolderStats(folder.uuid);
12521252

1253-
expect(result.fileCount).toBe(9973);
1253+
expect(result.fileCount).toBe(973);
12541254
expect(result.totalSize).toBe(27634171904);
12551255
expect(result.isFileCountExact).toBe(true);
12561256
expect(result.isTotalSizeExact).toBe(true);

src/modules/folder/folder.repository.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ export class SequelizeFolderRepository implements FolderRepository {
939939
totalSize: number;
940940
isTotalSizeExact: boolean;
941941
}> {
942-
const MAX_FILES = 10000;
942+
const MAX_FILES = 1001;
943943
const MAX_DEPTH = 50;
944944

945945
const calculateStatsQuery = `

0 commit comments

Comments
 (0)