From da64d9fbab7d73e203e7dbbb9503f4d422feaab0 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Mon, 8 Feb 2021 23:21:54 +0300 Subject: BaseProcess interface as a return type in the worker_watcher,pool and worker interface --- tests/plugins/gzip/configs/.rr-http-withGzip.yaml | 2 -- tests/plugins/informer/test_plugin.go | 8 +------- tests/psr-worker-bench.php | 9 +++++---- 3 files changed, 6 insertions(+), 13 deletions(-) (limited to 'tests') diff --git a/tests/plugins/gzip/configs/.rr-http-withGzip.yaml b/tests/plugins/gzip/configs/.rr-http-withGzip.yaml index 3ab918fb..dc12dc05 100644 --- a/tests/plugins/gzip/configs/.rr-http-withGzip.yaml +++ b/tests/plugins/gzip/configs/.rr-http-withGzip.yaml @@ -2,8 +2,6 @@ server: command: "php ../../psr-worker.php" user: "" group: "" - env: - "RR_HTTP": "true" relay: "pipes" relay_timeout: "20s" diff --git a/tests/plugins/informer/test_plugin.go b/tests/plugins/informer/test_plugin.go index 2300de89..8a1fb933 100644 --- a/tests/plugins/informer/test_plugin.go +++ b/tests/plugins/informer/test_plugin.go @@ -55,11 +55,5 @@ func (p1 *Plugin1) Workers() []worker.BaseProcess { panic(err) } - workers := p.Workers() - baseWorkers := make([]worker.BaseProcess, 0, len(workers)) - for i := 0; i < len(workers); i++ { - baseWorkers = append(baseWorkers, worker.FromSync(workers[i].(*worker.SyncWorkerImpl))) - } - - return baseWorkers + return p.Workers() } diff --git a/tests/psr-worker-bench.php b/tests/psr-worker-bench.php index ef741a61..3f634443 100644 --- a/tests/psr-worker-bench.php +++ b/tests/psr-worker-bench.php @@ -45,13 +45,14 @@ if ($env->getMode() === 'http') { $worker = $factory->newWorker('default'); // register all workflows - foreach ($getClasses(__DIR__ . '/../temporal/Workflow') as $name) { - $worker->registerWorkflowType('Temporal\\Tests\\Workflow\\' . $name); + foreach ($getClasses(__DIR__ . '/src/Workflow') as $name) { + $worker->registerWorkflowTypes('Temporal\\Tests\\Workflow\\' . $name); } // register all activity - foreach ($getClasses(__DIR__ . '/../temporal/Activity') as $name) { - $worker->registerActivityType('Temporal\\Tests\\Activity\\' . $name); + foreach ($getClasses(__DIR__ . '/src/Activity') as $name) { + $class = 'Temporal\\Tests\\Activity\\' . $name; + $worker->registerActivityImplementations(new $class); } $factory->run(); -- cgit v1.2.3