mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-16 23:40:32 +00:00
Update timeout within test to avoid UPSERT error
This commit is contained in:
@@ -156,10 +156,8 @@ describe.each(repositoryImplementations)('$name', (holder) => {
|
||||
intervalMs: 500
|
||||
};
|
||||
|
||||
// Non-existent structure
|
||||
expect(await repository.getHistoricalAveragesOfParkingStructureCounts("non-existent", options)).toEqual([]);
|
||||
|
||||
// Structure with no historical data
|
||||
await repository.addOrUpdateParkingStructure(testStructure);
|
||||
expect(await repository.getHistoricalAveragesOfParkingStructureCounts(testStructure.id, options)).toEqual([]);
|
||||
});
|
||||
@@ -179,7 +177,7 @@ describe.each(repositoryImplementations)('$name', (holder) => {
|
||||
// Add updates with small delays to ensure different timestamps
|
||||
for (let i = 0; i < updates.length; i++) {
|
||||
await repository.addOrUpdateParkingStructure(updates[i]);
|
||||
await new Promise(resolve => setTimeout(resolve, 10)); // Small delay
|
||||
await new Promise(resolve => setTimeout(resolve, 100)); // Small delay
|
||||
}
|
||||
|
||||
const now = Date.now();
|
||||
|
||||
Reference in New Issue
Block a user