remove test
This commit is contained in:
parent
865acb100e
commit
ebbd5e0949
2 changed files with 1 additions and 29 deletions
|
|
@ -327,7 +327,7 @@ public class DownloadService {
|
|||
return results;
|
||||
}
|
||||
|
||||
public File writeResultsToCsv(List<Map<String, Object>> results, int limit) {
|
||||
private File writeResultsToCsv(List<Map<String, Object>> results, int limit) {
|
||||
try {
|
||||
// If results fit in a single file, create one CSV
|
||||
if (results.size() <= limit) {
|
||||
|
|
|
|||
|
|
@ -195,27 +195,6 @@ class DownloadServiceTest {
|
|||
assertThat(lines).hasSize(50000);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testSqlResultsChunking() throws Exception {
|
||||
// Given: SQL results that will create exactly 2 chunks
|
||||
// generateSqlTestData(1199999) creates 1 header + 1,199,998 data rows = 1,199,999 total
|
||||
// With MAX_ROWS_PER_CSV = 600,000:
|
||||
// File 1: header + 599,999 data rows = 600,000 total
|
||||
// File 2: header + 599,999 data rows = 600,000 total
|
||||
List<String[]> sqlResults = generateSqlTestData(1199999);
|
||||
|
||||
// When: Writing SQL results with chunking
|
||||
File result = invokeWriteSqlResultsToZip(sqlResults);
|
||||
|
||||
// Then: Should create ZIP with 2 CSV files
|
||||
assertThat(result).isNotNull();
|
||||
assertThat(result.getName()).endsWith(".zip");
|
||||
|
||||
try (ZipFile zipFile = new ZipFile(result)) {
|
||||
assertThat(Collections.list(zipFile.entries())).hasSize(2);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void testZipFileContentsIntegrity() throws Exception {
|
||||
// Given: Large dataset
|
||||
|
|
@ -280,11 +259,4 @@ class DownloadServiceTest {
|
|||
method.setAccessible(true);
|
||||
return (File) method.invoke(downloadService, results, prefix, suffix);
|
||||
}
|
||||
|
||||
private File invokeWriteSqlResultsToZip(List<String[]> results) throws Exception {
|
||||
java.lang.reflect.Method method = DownloadService.class.getDeclaredMethod(
|
||||
"writeSqlResultsToZip", List.class);
|
||||
method.setAccessible(true);
|
||||
return (File) method.invoke(downloadService, results);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue