mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 12:04:02 +00:00
test(adapters-db): increase integration test timeouts to 10s
This commit is contained in:
@@ -26,7 +26,9 @@ describe('createDbHouseholdConfigurationRepository', () => {
|
||||
await queryClient.end({ timeout: 5 })
|
||||
})
|
||||
|
||||
testIfDatabase('registers a Telegram household chat and binds topics', async () => {
|
||||
testIfDatabase(
|
||||
'registers a Telegram household chat and binds topics',
|
||||
async () => {
|
||||
const repositoryClient = createDbHouseholdConfigurationRepository(databaseUrl!)
|
||||
const suffix = randomUUID()
|
||||
const telegramChatId = `-100${Date.now()}`
|
||||
@@ -71,8 +73,10 @@ describe('createDbHouseholdConfigurationRepository', () => {
|
||||
expect(purchase.role).toBe('purchase')
|
||||
expect(feedback.role).toBe('feedback')
|
||||
|
||||
const resolvedChat = await repositoryClient.repository.getTelegramHouseholdChat(telegramChatId)
|
||||
const resolvedPurchase = await repositoryClient.repository.findHouseholdTopicByTelegramContext({
|
||||
const resolvedChat =
|
||||
await repositoryClient.repository.getTelegramHouseholdChat(telegramChatId)
|
||||
const resolvedPurchase =
|
||||
await repositoryClient.repository.findHouseholdTopicByTelegramContext({
|
||||
telegramChatId,
|
||||
telegramThreadId: '7001'
|
||||
})
|
||||
@@ -98,5 +102,7 @@ describe('createDbHouseholdConfigurationRepository', () => {
|
||||
|
||||
await verificationClient.queryClient.end({ timeout: 5 })
|
||||
await repositoryClient.close()
|
||||
})
|
||||
},
|
||||
10000
|
||||
)
|
||||
})
|
||||
|
||||
@@ -28,7 +28,9 @@ describe('createDbTopicMessageHistoryRepository', () => {
|
||||
await queryClient.end({ timeout: 5 })
|
||||
})
|
||||
|
||||
testIfDatabase('lists the latest same-day chat messages in chronological order', async () => {
|
||||
testIfDatabase(
|
||||
'lists the latest same-day chat messages in chronological order',
|
||||
async () => {
|
||||
const householdClient = createDbHouseholdConfigurationRepository(databaseUrl!)
|
||||
const historyClient = createDbTopicMessageHistoryRepository(databaseUrl!)
|
||||
const telegramChatId = `-100${Date.now()}`
|
||||
@@ -90,5 +92,7 @@ describe('createDbTopicMessageHistoryRepository', () => {
|
||||
|
||||
await householdClient.close()
|
||||
await historyClient.close()
|
||||
})
|
||||
},
|
||||
10000
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user