X7ROOT File Manager
Current Path:
/opt/alt/tests/alt-php82-pecl-gearman_2.1.4-1.el8/tests
opt
/
alt
/
tests
/
alt-php82-pecl-gearman_2.1.4-1.el8
/
tests
/
📁
..
📄
connect.inc
(104 B)
📄
gearman_001.phpt
(205 B)
📄
gearman_002.phpt
(277 B)
📄
gearman_client_001.phpt
(492 B)
📄
gearman_client_002.phpt
(503 B)
📄
gearman_client_003.phpt
(459 B)
📄
gearman_client_004.phpt
(487 B)
📄
gearman_client_005.phpt
(544 B)
📄
gearman_client_006.phpt
(1.13 KB)
📄
gearman_client_007.phpt
(1.17 KB)
📄
gearman_client_008.phpt
(1.15 KB)
📄
gearman_client_009.phpt
(477 B)
📄
gearman_client_010.phpt
(1.01 KB)
📄
gearman_client_011.phpt
(957 B)
📄
gearman_client_012.phpt
(1.05 KB)
📄
gearman_client_013.phpt
(652 B)
📄
gearman_client_014.phpt
(634 B)
📄
gearman_client_015.phpt
(929 B)
📄
gearman_client_016.phpt
(1.58 KB)
📄
gearman_client_017.phpt
(1.82 KB)
📄
gearman_client_018.phpt
(2.2 KB)
📄
gearman_client_019.phpt
(673 B)
📄
gearman_client_020.phpt
(2.22 KB)
📄
gearman_client_021.phpt
(2.56 KB)
📄
gearman_client_022.phpt
(306 B)
📄
gearman_client_integration_test_001.phpt
(2.03 KB)
📄
gearman_client_integration_test_002.phpt
(1.3 KB)
📄
gearman_job_001.phpt
(265 B)
📄
gearman_job_002.phpt
(1.33 KB)
📄
gearman_job_003.phpt
(294 B)
📄
gearman_job_integration_test_001.phpt
(1.4 KB)
📄
gearman_job_integration_test_002.phpt
(1.41 KB)
📄
gearman_job_integration_test_003.phpt
(1.39 KB)
📄
gearman_job_integration_test_004.phpt
(1.42 KB)
📄
gearman_job_integration_test_005.phpt
(1.43 KB)
📄
gearman_job_integration_test_006.phpt
(1.38 KB)
📄
gearman_job_integration_test_007.phpt
(1.4 KB)
📄
gearman_job_integration_test_008.phpt
(1.43 KB)
📄
gearman_job_integration_test_009.phpt
(1.41 KB)
📄
gearman_job_integration_test_010.phpt
(1.52 KB)
📄
gearman_task_001.phpt
(806 B)
📄
gearman_task_002.phpt
(931 B)
📄
gearman_task_003.phpt
(1.09 KB)
📄
gearman_task_004.phpt
(2.09 KB)
📄
gearman_task_005.phpt
(1.3 KB)
📄
gearman_task_006.phpt
(301 B)
📄
gearman_tasks_integration_test_001.phpt
(1.94 KB)
📄
gearman_tasks_integration_test_002.phpt
(2.31 KB)
📄
gearman_worker_001.phpt
(474 B)
📄
gearman_worker_002.phpt
(474 B)
📄
gearman_worker_003.phpt
(435 B)
📄
gearman_worker_004.phpt
(444 B)
📄
gearman_worker_005.phpt
(453 B)
📄
gearman_worker_006.phpt
(850 B)
📄
gearman_worker_007.phpt
(848 B)
📄
gearman_worker_008.phpt
(1.2 KB)
📄
gearman_worker_009.phpt
(547 B)
📄
gearman_worker_010.phpt
(1.02 KB)
📄
gearman_worker_011.phpt
(379 B)
📄
gearman_worker_012.phpt
(1.96 KB)
📄
gearman_worker_013.phpt
(826 B)
📄
gearman_worker_014.phpt
(1.32 KB)
📄
gearman_worker_015.phpt
(704 B)
📄
gearman_worker_016.phpt
(1.8 KB)
📄
gearman_worker_017.phpt
(306 B)
📄
gearman_worker_integration_test_001.phpt
(2.14 KB)
📄
skipif.inc
(174 B)
📄
skipifconnect.inc
(396 B)
📄
skipifversion.inc
(248 B)
Editing: gearman_client_integration_test_001.phpt
--TEST-- --SKIPIF-- <?php require_once('skipif.inc'); require_once('skipifconnect.inc'); ?> --FILE-- <?php $host = 'localhost'; $port = '4730'; $job_name = uniqid(); $pid = pcntl_fork(); if ($pid == -1) { die("Could not fork"); } else if ($pid > 0) { // Parent. This should be the Worker $worker = new GearmanWorker(); $worker->addServer($host, $port); print "addFunction: " . var_export( $worker->addFunction( $job_name, function($job) { print "workload: " . var_export($job->workload(), true) . PHP_EOL; } ), true ) . PHP_EOL; for($i=0; $i<6; $i++) { $worker->work(); } print "unregister: " . var_export($worker->unregister($job_name), true) . PHP_EOL; // Wait for child $exit_status = 0; if (pcntl_wait($exit_status) <= 0) { print "pcntl_wait exited with error" . PHP_EOL; } else if (!pcntl_wifexited($exit_status)) { print "child exited with error" . PHP_EOL; } print "OK" . PHP_EOL; } else { // Child. This is the Client $client = new GearmanClient(); $client->addServer($host, $port); $job_types = ['doNormal', 'doHigh', 'doLow']; foreach ($job_types as $job_type) { $unique_key = "{$job_name}_{$job_type}"; $workload = "Workload for $job_type"; $handle = $client->$job_type($job_name, $workload, $unique_key); } // Background jobs can run into a race condition if they complete out of // order $job_types = ['doBackground', 'doHighBackground', 'doLowBackground']; foreach ($job_types as $job_type) { $unique_key = "{$job_name}_{$job_type}"; $workload = "Workload for $job_type"; $handle = $client->$job_type($job_name, $workload, $unique_key); do { usleep(10000); list($is_known, $is_running, $numerator, $denominator) = $client->jobStatus($handle); } while ($is_known === true || $is_running === true); } } ?> --EXPECT-- addFunction: true workload: 'Workload for doNormal' workload: 'Workload for doHigh' workload: 'Workload for doLow' workload: 'Workload for doBackground' workload: 'Workload for doHighBackground' workload: 'Workload for doLowBackground' unregister: true OK
Upload File
Create Folder