コード例 #1
0
ファイル: JQJobsTest.php プロジェクト: apinstein/jqjobs
 /**
  * @dataProvider autoscalingAlgorithmsDataProvider
  * @testdox Autoscaling algorithm math
  * @dataProviderTestdox %1$15s: (max=%3$d) %2$5d jobs => %4$5s workers
  */
 function testAutoscalingAlgorithms($algo, $numPending, $maxConcurrency, $expectedValue)
 {
     $this->assertEquals($expectedValue, JQAutoscaler::calculateScale($algo, $numPending, $maxConcurrency));
 }
コード例 #2
0
ファイル: JQAutoscalerTest.php プロジェクト: apinstein/jqjobs
 function testSettingScalerPollingInterval()
 {
     $autoscaler = new JQAutoscaler($this->getMock('JQStore_Array'), $this->getMock('JQScalable_Noop'), array());
     $autoscaler->setScalerPollingInterval(10);
 }