Skip to content

Commit

Permalink
Add detection of bug #836
Browse files Browse the repository at this point in the history
  • Loading branch information
zyronix committed Mar 17, 2023
1 parent 08f657a commit e97797d
Showing 1 changed file with 11 additions and 25 deletions.
36 changes: 11 additions & 25 deletions ci/tests/integration/RuleSplitTest.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,15 @@ private function testRuleSplit() {
"priority" => 100,
"color" => "FFFFFF",
"crackerVersionId" => 1,
"files" => [$file_id1, $file_id2]]
"files" => [$file_id1, $file_id2],
"chunksize" => 1],
);

$task1Id = $response["taskId"];

# Enable rulesplit
$this->setConfig('ruleSplitDisable', '0');
$this->setConfig('ruleSplitDisable', false);
$this->setConfig('ruleSplitAlways', true);

# Create agent
$agent = $this->createAgent("agent-1");
Expand All @@ -92,31 +94,15 @@ private function testRuleSplit() {
"taskId" => $task1Id,
"token" => $agent["token"],
"type" => "speed",
"result" => '2000:50']
"result" => '2000:2200000']
);
# getChunk
$response = HashtopolisTestFramework::doRequest([
"action" => "getChunk",
"taskId" => $task1Id,
"token" => $agent["token"]]
);
$chunkId = $response['chunkId'];

# probeer de file te splitten
$response = HashtopolisTestFramework::doRequest([
"action" => "sendProgress",
"chunkId" => $chunkId,
"token" => $agent["token"],
"keyspaceProgress" => 500,
"relativeProgress" => "4545",
"speed" => 500,
"state" => 3,
"cracks" => [],
"gpuTemp" => [67],
"gpuUtil" => [99]
]);
if (!is_array($response)) {
$this->testFailed("RuleSplitTest:testRuleSplit()", sprintf("Expected benchmark to return OK."));
} else {
$this->testSuccess("RuleSplitTest:testRuleSplit()");
}

$this->testSuccess("RuleSplitTest:testRuleSplit()");

}

private function createTask($values = []) {
Expand Down

0 comments on commit e97797d

Please sign in to comment.