Просмотр исходного кода

test(core): Fix other search e2e tests

Michael Bromley 1 год назад
Родитель
Сommit
b4a773f338

+ 4 - 0
packages/core/e2e/default-search-plugin-uuids.e2e-spec.ts

@@ -50,6 +50,10 @@ describe('Default search plugin with UUIDs', () => {
         // rebuild is not completed in time for the first test.
         await new Promise(resolve => setTimeout(resolve, 5000));
 
+        // We have extra time here because a lot of jobs are
+        // triggered from all the product updates
+        await awaitRunningJobs(adminClient, 10_000, 1000);
+
         const { facets } = await adminClient.query<GetFacetListQuery, GetFacetListQueryVariables>(
             GET_FACET_LIST,
             {

+ 3 - 0
packages/elasticsearch-plugin/e2e/elasticsearch-plugin-uuid.e2e-spec.ts

@@ -43,6 +43,9 @@ describe('Elasticsearch plugin with UuidIdStrategy', () => {
             customerCount: 1,
         });
         await adminClient.asSuperAdmin();
+        // We have extra time here because a lot of jobs are
+        // triggered from all the product updates
+        await awaitRunningJobs(adminClient, 10_000, 1000);
         await adminClient.query(REINDEX);
         await awaitRunningJobs(adminClient);
     }, TEST_SETUP_TIMEOUT_MS);

+ 3 - 1
packages/elasticsearch-plugin/e2e/elasticsearch-plugin.e2e-spec.ts

@@ -188,7 +188,9 @@ describe('Elasticsearch plugin', () => {
             customerCount: 1,
         });
         await adminClient.asSuperAdmin();
-        await awaitRunningJobs(adminClient);
+        // We have extra time here because a lot of jobs are
+        // triggered from all the product updates
+        await awaitRunningJobs(adminClient, 10_000, 1000);
         await adminClient.query(REINDEX);
         await awaitRunningJobs(adminClient);
     }, TEST_SETUP_TIMEOUT_MS);