fix(): Event group id propagation and event managements (#12157)
This commit is contained in:
@@ -66,16 +66,12 @@ medusaIntegrationTestRunner({
|
||||
|
||||
describe("Index engine syncing", () => {
|
||||
it("should sync the data to the index based on the indexation configuration", async () => {
|
||||
console.info("[Index engine] Creating products")
|
||||
|
||||
await populateData(api, {
|
||||
productCount: 2,
|
||||
variantCount: 2,
|
||||
priceCount: 2,
|
||||
})
|
||||
|
||||
console.info("[Index engine] Creating products done")
|
||||
|
||||
await setTimeout(1000)
|
||||
await dbConnection.raw('TRUNCATE TABLE "index_data";')
|
||||
await dbConnection.raw('TRUNCATE TABLE "index_relation";')
|
||||
@@ -96,12 +92,9 @@ medusaIntegrationTestRunner({
|
||||
// Prevent storage provider to be triggered though
|
||||
;(indexEngine as any).storageProvider_.onApplicationStart = jest.fn()
|
||||
|
||||
console.info("[Index engine] Triggering sync")
|
||||
// Trigger a sync
|
||||
await (indexEngine as any).onApplicationStart_()
|
||||
|
||||
console.info("[Index engine] Sync done")
|
||||
|
||||
// 28 ms - 6511 records
|
||||
const { data: results } = await indexEngine.query<"product">({
|
||||
fields: [
|
||||
@@ -122,12 +115,8 @@ medusaIntegrationTestRunner({
|
||||
})
|
||||
|
||||
it("should sync the data to the index based on the updated indexation configuration", async () => {
|
||||
console.info("[Index engine] Creating products")
|
||||
|
||||
await populateData(api)
|
||||
|
||||
console.info("[Index engine] Creating products done")
|
||||
|
||||
await setTimeout(1000)
|
||||
await dbConnection.raw('TRUNCATE TABLE "index_data";')
|
||||
await dbConnection.raw('TRUNCATE TABLE "index_relation";')
|
||||
@@ -148,12 +137,9 @@ medusaIntegrationTestRunner({
|
||||
// Prevent storage provider to be triggered though
|
||||
;(indexEngine as any).storageProvider_.onApplicationStart = jest.fn()
|
||||
|
||||
console.info("[Index engine] Triggering sync")
|
||||
// Trigger a sync
|
||||
await (indexEngine as any).onApplicationStart_()
|
||||
|
||||
console.info("[Index engine] Sync done")
|
||||
|
||||
const { data: results } = await indexEngine.query<"product">({
|
||||
fields: [
|
||||
"product.*",
|
||||
|
||||
Reference in New Issue
Block a user