mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
✅ GivenObjectInDB() and additional improvements in the tests suite to address false positive and slow tests
Rewrite tests on impact analysis to make them readable in the first place, then simplifiy the tests to focus on risk reduction, then complete with some edge case Rewrite tests on impact graph build when the current user has restricted access to some parts of the graph
This commit is contained in:
committed by
Romain Quetiez
parent
b8d8ec640d
commit
984f676d6e
@@ -40,15 +40,6 @@ class LoginTest extends ItopDataTestCase {
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testLoginInfiniteLoopFix() {
|
||||
$iTimeStamp = microtime(true);
|
||||
$sOutput = $this->CallItopUrlByCurl(sprintf("/pages/UI.php?login_mode=%s", $this->sLoginMode));
|
||||
$iElapsedInMs = (microtime(true) - $iTimeStamp) * 1000;
|
||||
$sMaxExecutionInS = 1;
|
||||
$this->assertTrue($iElapsedInMs < $sMaxExecutionInS * 1000, "iTop answered in $iElapsedInMs ms. it should do it in less than $sMaxExecutionInS seconds (max_execution_time)");
|
||||
$this->assertFalse(strpos($sOutput, "Fatal error"), "no fatal error due to max execution time should be returned" . $sOutput);
|
||||
}
|
||||
|
||||
protected function CallItopUrlByCurl($sUri, ?array $aPostFields=[]){
|
||||
$ch = curl_init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user