Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Sep 3, 2024
1 parent 78627d3 commit b96616a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions plugin-server/tests/cdp/cdp-consumer.e2e.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CdpFunctionCallbackConsumer, CdpProcessedEventsConsumer } from '../../src/cdp/cdp-consumers'
import { HogFunctionInvocationGlobals, HogFunctionType } from '../../src/cdp/types'
import { Hub, Team } from '../../src/types'
import { createHub } from '../../src/utils/db/hub'
import { closeHub, createHub } from '../../src/utils/db/hub'
import { getFirstTeam, resetTestDatabase } from '../helpers/sql'
import { HOG_EXAMPLES, HOG_FILTERS_EXAMPLES, HOG_INPUTS_EXAMPLES } from './examples'
import { createHogExecutionGlobals, insertHogFunction as _insertHogFunction } from './fixtures'
Expand Down Expand Up @@ -87,7 +87,6 @@ describe('CDP Consumers E2E', () => {
let processedEventsConsumer: CdpProcessedEventsConsumer
let functionProcessor: CdpFunctionCallbackConsumer
let hub: Hub
let closeHub: () => Promise<void>
let team: Team

const insertHogFunction = async (hogFunction: Partial<HogFunctionType>) => {
Expand All @@ -100,7 +99,7 @@ describe('CDP Consumers E2E', () => {

beforeEach(async () => {
await resetTestDatabase()
;[hub, closeHub] = await createHub()
hub = await createHub()
team = await getFirstTeam(hub)

processedEventsConsumer = new CdpProcessedEventsConsumer(hub)
Expand All @@ -115,7 +114,7 @@ describe('CDP Consumers E2E', () => {
jest.setTimeout(10000)
await processedEventsConsumer.stop()
await functionProcessor.stop()
await closeHub()
await closeHub(hub)
})

afterAll(() => {
Expand Down

0 comments on commit b96616a

Please sign in to comment.