Skip to content

Commit e32007f

Browse files
committed
test with empty valued queue timeout
1 parent 0f41046 commit e32007f

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

tests/Feature/ImportCommandTest.php

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public function test_chained_queue_timeout_configuration(): void
225225
});
226226
}
227227

228-
public function test_chained_queue_timeout_configuration_with_empty_string(): void
228+
public function test_chained_queue_timeout_configuration_with_null_value(): void
229229
{
230230
Bus::fake([
231231
Import::class,
@@ -246,4 +246,26 @@ public function test_chained_queue_timeout_configuration_with_empty_string(): vo
246246
return $job->timeout === null;
247247
});
248248
}
249+
250+
public function test_chained_queue_timeout_configuration_with_empty_string(): void
251+
{
252+
Bus::fake([
253+
Import::class,
254+
]);
255+
256+
$this->app['config']->set('scout.queue', ['connection' => 'sync', 'queue' => 'scout']);
257+
$this->app['config']->set('elasticsearch.queue.timeout', '');
258+
259+
$output = new BufferedOutput();
260+
Artisan::call('scout:import', [], $output);
261+
262+
$output = array_map('trim', explode("\n", $output->fetch()));
263+
264+
$this->assertContains(trans('scout::import.start', ['searchable' => Product::class]), $output);
265+
$this->assertContains('[OK] '.trans('scout::import.done.queue', ['searchable' => Product::class]), $output);
266+
267+
Bus::assertDispatched(function (Import $job) {
268+
return $job->timeout === null;
269+
});
270+
}
249271
}

0 commit comments

Comments
 (0)