Skip to content

Commit

Permalink
Replace usleep with sleep calls
Browse files Browse the repository at this point in the history
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
  • Loading branch information
devenbansod committed Aug 22, 2017
1 parent 8c32018 commit 11bc4c6
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion test/selenium/PmaSeleniumCreateRemoveUserTest.php
Expand Up @@ -78,7 +78,7 @@ public function testCreateRemoveUser()
&& ! $this->isElementPresent('byId', 'ajax_message_num_1')
) {
$ele->click();
usleep(1000000);
sleep(1);
}

$this->waitForElementNotPresent('byId', 'ajax_message_num_1');
Expand Down
2 changes: 1 addition & 1 deletion test/selenium/PmaSeleniumDbProceduresTest.php
Expand Up @@ -189,7 +189,7 @@ public function testDropProcedure()

$this->waitForElement("byId", "nothing2display");

usleep(1000000);
sleep(1);
$result = $this->dbQuery(
"SHOW PROCEDURE STATUS WHERE Db='" . $this->database_name . "'"
);
Expand Down
3 changes: 1 addition & 2 deletions test/selenium/PmaSeleniumDbTriggersTest.php
Expand Up @@ -207,8 +207,7 @@ public function testDropTrigger()
)->click();

$this->waitForElement("byId", "nothing2display");

usleep(1000000);
sleep(1);

// test trigger
$this->dbQuery("INSERT INTO `test_table` (val) VALUES (1);");
Expand Down
2 changes: 1 addition & 1 deletion test/selenium/PmaSeleniumImportTest.php
Expand Up @@ -118,7 +118,7 @@ private function _doImport($type)
$this->select($this->byName("local_import_file"))
->selectOptionByLabel($type . "_import.sql");

usleep(1000000);
sleep(1);

$this->scrollToBottom();
$this->byId("buttonGo")->click();
Expand Down
2 changes: 1 addition & 1 deletion test/selenium/PmaSeleniumTableBrowseTest.php
Expand Up @@ -294,7 +294,7 @@ public function testCopyRecords()
// automatically gets appended with 00:00:00
$this->keys("2012-01-2");
$this->byId("field_2_3")->value("ABCDEFG");
usleep(1000000); // longer string takes longer to type
sleep(1); // longer string takes longer to type

$this->waitForElement('byId', "buttonYes")->click();

Expand Down
4 changes: 2 additions & 2 deletions test/selenium/PmaSeleniumTableInsertTest.php
Expand Up @@ -70,7 +70,7 @@ public function testAddData()
$this->byPartialLinkText("Insert")->click();
$this->waitForElementNotPresent('byId', 'ajax_message_num_1');
$this->waitForElement("byId", "insertForm");
usleep(1000000);
sleep(1);

$this->byId("field_3_3")->click();
// shorter date to prevent error,
Expand Down Expand Up @@ -109,7 +109,7 @@ public function testAddData()
)->click();

$this->waitForElementNotPresent("byId", "ajax_message_num_1");
usleep(2000000);
sleep(2);

// New message
$ele = $this->waitForElement(
Expand Down
1 change: 0 additions & 1 deletion test/selenium/PmaSeleniumTableStructureTest.php
Expand Up @@ -55,7 +55,6 @@ public function setUpPage()

$this->waitForElementNotPresent('byId', 'ajax_message_num_1');
$this->waitForElement("byId", "tablestructure");
usleep(1000000);

// Dynamic wait
$this->waitUntil(function () {
Expand Down
2 changes: 1 addition & 1 deletion test/selenium/PmaSeleniumXssTest.php
Expand Up @@ -38,7 +38,7 @@ public function testQueryTabWithNullValue()
$this->waitForElement('byPartialLinkText', "SQL")->click();
$this->waitForElementNotPresent('byId', 'ajax_message_num_1');

usleep(1000000);
sleep(1);
$this->waitForElement("byId", "queryboxf");
$this->byId("button_submit_query")->click();
$this->assertEquals("Missing value in the form!", $this->alertText());
Expand Down
4 changes: 2 additions & 2 deletions test/selenium/TestBase.php
Expand Up @@ -652,7 +652,7 @@ public function scrollIntoView($element_id, $offset = 70)
'args' => array()
)
);
usleep(1000000);
sleep(1);
}

/**
Expand All @@ -668,7 +668,7 @@ public function scrollToBottom()
'args' => array()
)
);
usleep(1000000);
sleep(1);
}

/**
Expand Down

0 comments on commit 11bc4c6

Please sign in to comment.