Merge ~alexsander-souza/maas:lp1989567 into maas:master

Proposed by Alexsander de Souza
Status: Merged
Approved by: Alexsander de Souza
Approved revision: 3ecc8bbdba047458d5eae098aebccc8e97d6dd41
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~alexsander-souza/maas:lp1989567
Merge into: maas:master
Diff against target: 26 lines (+3/-3)
1 file modified
src/maasserver/tests/test_ipc.py (+3/-3)
Reviewer Review Type Date Requested Status
Jack Lloyd-Walters Approve
MAAS Lander Approve
Review via email: mp+457833@code.launchpad.net

Commit message

fix flaky test_update_allows_new_connections_while_updating_connections_in_db

fixes LP#1989567

Description of the change

avoid conn_id collision

To post a comment you must log in.
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b lp1989567 lp:~alexsander-souza/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 3ecc8bbdba047458d5eae098aebccc8e97d6dd41

review: Approve
Revision history for this message
Jack Lloyd-Walters (lloydwaltersj) wrote :

+1, I appreciate the simplicity of the solution!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasserver/tests/test_ipc.py b/src/maasserver/tests/test_ipc.py
2index 19344fd..b26c209 100644
3--- a/src/maasserver/tests/test_ipc.py
4+++ b/src/maasserver/tests/test_ipc.py
5@@ -594,10 +594,10 @@ class TestIPCCommunication(MAASTransactionServerTestCase):
6
7 rack_controller = yield deferToDatabase(factory.make_RackController)
8
9- for _ in range(2):
10+ for i in range(2):
11 master.registerWorkerRPCConnection(
12 pid,
13- random.randint(1, 512),
14+ i,
15 rack_controller.system_id,
16 ip,
17 random.randint(1, 512),
18@@ -608,7 +608,7 @@ class TestIPCCommunication(MAASTransactionServerTestCase):
19 master.update(),
20 master.registerWorkerRPCConnection(
21 pid,
22- random.randint(1, 512),
23+ 3,
24 rack_controller.system_id,
25 ip,
26 random.randint(1, 512),

Subscribers

People subscribed via source and target branches