Skip to content

Instantly share code, notes, and snippets.

@odinuv
Created September 27, 2018 15:10
Show Gist options
  • Save odinuv/593bf604ccac170db02b99e91ee54404 to your computer and use it in GitHub Desktop.
Save odinuv/593bf604ccac170db02b99e91ee54404 to your computer and use it in GitHub Desktop.
Testing the untestable: Testing connection retry
<?php
testConnectionRetry()
{
$rows = 1000000;
$credentials = $this->setupTestDatabaseConnetion();
$table = $this->createLargeTable($credentials, $rows);
$configFile = $this->createConfigFile($credentials, $table);
$extractor = new Extractor($configFile);
exec('cports /close * * * 3600');
$resultFile = $extractor->run();
self::assertTrue($rows, $this->getRowCunt($resultFile));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment