File tree 2 files changed +17
-4
lines changed
2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ def start(self):
79
79
80
80
self ._partitioner = coordination .Partitioner (
81
81
self .coordination .coordinator , self .service_name ,
82
- self .coordination .coordination_id .encode (), range (0 , 4095 )
82
+ self .coordination .coordination_id .encode (), range (0 , 4096 )
83
83
)
84
84
85
85
self ._partitioner .start ()
Original file line number Diff line number Diff line change 15
15
# under the License.
16
16
from oslo_log import log as logging
17
17
18
+ from designate import objects
18
19
from designate .tests import TestCase
19
20
21
+
20
22
LOG = logging .getLogger (__name__ )
21
23
22
24
23
25
class ProducerServiceTest (TestCase ):
26
+ def setUp (self ):
27
+ super ().setUp ()
28
+ self .producer_service = self .start_service ('producer' )
29
+
24
30
def test_stop (self ):
25
- # Test stopping the service
26
- service = self .start_service ("producer" )
27
- service .stop ()
31
+ self .producer_service .stop ()
32
+
33
+ def test_validate_partition_range (self ):
34
+ self .producer_service .start ()
35
+
36
+ min_partition = objects .Zone .fields ['shard' ].min
37
+ max_partition = objects .Zone .fields ['shard' ].max
38
+
39
+ self .assertIn (min_partition , self .producer_service .partition_range )
40
+ self .assertIn (max_partition , self .producer_service .partition_range )
You can’t perform that action at this time.
0 commit comments