ソースを参照

test: Use distinct ports for e2e tests

Otherwise the AssetServerPlugin & ElasticsearchPlugin e2e tests run in parallel and error when the same port is used.
Michael Bromley 6 年 前
コミット
997c6a2476

+ 6 - 0
packages/asset-server-plugin/e2e/asset-server-plugin.e2e-spec.ts

@@ -21,6 +21,12 @@ describe('AssetServerPlugin', () => {
 
     const { server, adminClient, shopClient } = createTestEnvironment(
         mergeConfig(testConfig, {
+            port: 5050,
+            workerOptions: {
+                options: {
+                    port: 5055,
+                },
+            },
             logger: new DefaultLogger({ level: LogLevel.Info }),
             plugins: [
                 AssetServerPlugin.init({

+ 6 - 0
packages/elasticsearch-plugin/e2e/elasticsearch-plugin.e2e-spec.ts

@@ -57,6 +57,12 @@ import {
 describe('Elasticsearch plugin', () => {
     const { server, adminClient, shopClient } = createTestEnvironment(
         mergeConfig(testConfig, {
+            port: 4050,
+            workerOptions: {
+                options: {
+                    port: 4055,
+                },
+            },
             logger: new DefaultLogger({ level: LogLevel.Info }),
             plugins: [
                 ElasticsearchPlugin.init({