Skip to content

Commit 2a9550d

Browse files
committed
delay strategy
1 parent 0405f4c commit 2a9550d

6 files changed

Lines changed: 24 additions & 16 deletions

File tree

‎phpunit.xml.dist‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
<directory>pkg/amqp-bunny/Tests</directory>
3030
</testsuite>
3131

32+
<testsuite name="amqp-lib transport">
33+
<directory>pkg/amqp-lib/Tests</directory>
34+
</testsuite>
35+
36+
<testsuite name="amqp-tools">
37+
<directory>pkg/amqp-tools/Tests</directory>
38+
</testsuite>
39+
3240
<testsuite name="fs transport">
3341
<directory>pkg/fs/Tests</directory>
3442
</testsuite>

‎pkg/amqp-bunny/Symfony/RabbitMqAmqpBunnyTransportFactory.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public function addConfiguration(ArrayNodeDefinition $builder)
3030

3131
$builder
3232
->children()
33-
->booleanNode('delay_strategy')
34-
->defaultFalse()
33+
->scalarNode('delay_strategy')
34+
->defaultNull()
3535
->info('The delay strategy to be used. Possible values are "dlx", "delayed_message_plugin" or service id')
3636
->end()
3737
;

‎pkg/amqp-bunny/Tests/Symfony/RabbitMqAmqpBunnyTransportFactoryTest.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testShouldAllowAddConfiguration()
5858
'user' => 'guest',
5959
'pass' => 'guest',
6060
'vhost' => '/',
61-
'delay_plugin_installed' => false,
61+
'delay_strategy' => null,
6262
'lazy' => true,
6363
'receive_method' => 'basic_get',
6464
'heartbeat' => 0,
@@ -78,7 +78,7 @@ public function testShouldCreateConnectionFactory()
7878
'pass' => 'guest',
7979
'vhost' => '/',
8080
'persisted' => false,
81-
'delay_plugin_installed' => false,
81+
'delay_strategy' => null,
8282
]);
8383

8484
$this->assertTrue($container->hasDefinition($serviceId));
@@ -91,7 +91,7 @@ public function testShouldCreateConnectionFactory()
9191
'pass' => 'guest',
9292
'vhost' => '/',
9393
'persisted' => false,
94-
'delay_plugin_installed' => false,
94+
'delay_strategy' => null,
9595
]], $factory->getArguments());
9696
}
9797

@@ -108,7 +108,7 @@ public function testShouldCreateContext()
108108
'pass' => 'guest',
109109
'vhost' => '/',
110110
'persisted' => false,
111-
'delay_plugin_installed' => false,
111+
'delay_strategy' => null,
112112
]);
113113

114114
$this->assertEquals('enqueue.transport.rabbitmq_amqp_bunny.context', $serviceId);

‎pkg/amqp-ext/Symfony/RabbitMqAmqpTransportFactory.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public function addConfiguration(ArrayNodeDefinition $builder)
3030

3131
$builder
3232
->children()
33-
->booleanNode('delay_strategy')
34-
->defaultFalse()
33+
->scalarNode('delay_strategy')
34+
->defaultNull()
3535
->info('The delay strategy to be used. Possible values are "dlx", "delayed_message_plugin" or service id')
3636
->end()
3737
;

‎pkg/amqp-ext/Tests/Symfony/RabbitMqAmqpTransportFactoryTest.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function testShouldAllowAddConfiguration()
5959
'pass' => 'guest',
6060
'vhost' => '/',
6161
'persisted' => false,
62-
'delay_plugin_installed' => false,
62+
'delay_strategy' => null,
6363
'lazy' => true,
6464
'receive_method' => 'basic_get',
6565
], $config);
@@ -78,7 +78,7 @@ public function testShouldCreateConnectionFactory()
7878
'pass' => 'guest',
7979
'vhost' => '/',
8080
'persisted' => false,
81-
'delay_plugin_installed' => false,
81+
'delay_strategy' => null,
8282
]);
8383

8484
$this->assertTrue($container->hasDefinition($serviceId));
@@ -91,7 +91,7 @@ public function testShouldCreateConnectionFactory()
9191
'pass' => 'guest',
9292
'vhost' => '/',
9393
'persisted' => false,
94-
'delay_plugin_installed' => false,
94+
'delay_strategy' => null,
9595
]], $factory->getArguments());
9696
}
9797

@@ -108,7 +108,7 @@ public function testShouldCreateContext()
108108
'pass' => 'guest',
109109
'vhost' => '/',
110110
'persisted' => false,
111-
'delay_plugin_installed' => false,
111+
'delay_strategy' => null,
112112
]);
113113

114114
$this->assertEquals('enqueue.transport.rabbitmq_amqp.context', $serviceId);

‎pkg/amqp-lib/Tests/Symfony/RabbitMqAmqpLibTransportFactoryTest.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testShouldAllowAddConfiguration()
5858
'user' => 'guest',
5959
'pass' => 'guest',
6060
'vhost' => '/',
61-
'delay_plugin_installed' => false,
61+
'delay_strategy' => null,
6262
'lazy' => true,
6363
'receive_method' => 'basic_get',
6464
'connection_timeout' => 3.0,
@@ -85,7 +85,7 @@ public function testShouldCreateConnectionFactory()
8585
'pass' => 'guest',
8686
'vhost' => '/',
8787
'persisted' => false,
88-
'delay_plugin_installed' => false,
88+
'delay_strategy' => null,
8989
]);
9090

9191
$this->assertTrue($container->hasDefinition($serviceId));
@@ -98,7 +98,7 @@ public function testShouldCreateConnectionFactory()
9898
'pass' => 'guest',
9999
'vhost' => '/',
100100
'persisted' => false,
101-
'delay_plugin_installed' => false,
101+
'delay_strategy' => null,
102102
]], $factory->getArguments());
103103
}
104104

@@ -115,7 +115,7 @@ public function testShouldCreateContext()
115115
'pass' => 'guest',
116116
'vhost' => '/',
117117
'persisted' => false,
118-
'delay_plugin_installed' => false,
118+
'delay_strategy' => null,
119119
]);
120120

121121
$this->assertEquals('enqueue.transport.rabbitmq_amqp_lib.context', $serviceId);

0 commit comments

Comments
 (0)