File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ public function it_adds_mutex_timeout_which_is_zero_by_default()
2929 $ this ->assertEquals (0 , (new GenericCommand )->getMutexTimeout ());
3030 }
3131
32+ /** @test */
33+ public function mutex_timeout_can_be_overloaded_by_protected_field ()
34+ {
35+ $ this ->assertEquals (3000 , (new TimeoutCommand )->getMutexTimeout ());
36+ }
37+
3238 /** @test */
3339 public function it_generates_mutex_name_based_on_the_command_name_and_arguments ()
3440 {
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use Illuminate \Console \Command ;
4+ use Illuminated \Console \WithoutOverlapping ;
5+
6+ class TimeoutCommand extends Command
7+ {
8+ use WithoutOverlapping;
9+
10+ protected $ signature = 'icm:timeout-command ' ;
11+ protected $ mutexTimeout = 3000 ;
12+
13+ public function handle ()
14+ {
15+ $ this ->info ('Done! ' );
16+ }
17+ }
Original file line number Diff line number Diff line change @@ -5,5 +5,6 @@ class Kernel extends \Orchestra\Testbench\Console\Kernel
55 protected $ commands = [
66 GenericCommand::class,
77 MysqlStrategyCommand::class,
8+ TimeoutCommand::class,
89 ];
910}
You can’t perform that action at this time.
0 commit comments