Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(373)

Issue 84430044: mock_test server uses fixed order

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by dave
Modified:
10 years ago
Reviewers:
mp+214170, thumper, rog
Visibility:
Public.

Description

mock_test server uses fixed order Update lp 1299958 In a previous attempt to fix this issue it was pointed out that the order of the top level is important. https://codereview.appspot.com/82490043/#msg2 However the mock server does not respect any order as the fakeMachines are stored in a map. This CL attempts to solve the problem by storing fake machines in a slice. However if you run this test repeatedly you will see the results are still not stable and in fact the test was relying on a small map to order its keys. https://code.launchpad.net/~dave-cheney/juju-core/124-worker-peergrouper-mock-fix/+merge/214170 (do not edit description out of merge proposal)

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -12 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M worker/peergrouper/mock_test.go View 6 chunks +30 lines, -12 lines 0 comments Download

Messages

Total messages: 5
dave_cheney.net
Please take a look.
10 years ago (2014-04-04 07:21:21 UTC) #1
dave_cheney.net
ping
10 years ago (2014-04-06 23:22:01 UTC) #2
thumper
LGTM While I'm not entirely happy with the method name machine0, I can't think of ...
10 years ago (2014-04-06 23:29:47 UTC) #3
dave_cheney.net
You shouldn't LGTM this change. It doesn't fix the problem, but it does highlight that ...
10 years ago (2014-04-06 23:52:27 UTC) #4
rog
10 years ago (2014-04-07 10:31:25 UTC) #5
I don't understand this CL. The order of machines (which is what it
seems this CL is trying to fix) doesn't matter, but
the order of addresses within a machine does. In the previous
review I made my remark because it was treating {{addr2 addr1} {addr3}}
as equivalent to {{addr1 addr3} {addr2}}, whereas it should
actually be treating it as equivalent to {{addr3} {{addr2 addr1}} only.

Perhaps this was needless pedantry because I *think* that
in the peergrouper tests we only ever assign one address
to any given machine. It's perhaps still worth getting right
though.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b