Merge lp:~gz/goose/never_decrement_next_id into lp:goose
Proposed by
Martin Packman
Status: | Merged |
---|---|
Approved by: | Martin Packman |
Approved revision: | 68 |
Merged at revision: | 70 |
Proposed branch: | lp:~gz/goose/never_decrement_next_id |
Merge into: | lp:goose |
Diff against target: |
33 lines (+0/-9) 1 file modified
testservices/novaservice/service_http.go (+0/-9) |
To merge this branch: | bzr merge lp:~gz/goose/never_decrement_next_id |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
The Go Language Gophers | Pending | ||
Review via email: mp+147208@code.launchpad.net |
Commit message
Never decrement next id in nova testservce
Adjusting the next id downwards is not necessary and can cause breakage
across testcases when cleanup does not exactly match creation, which is
common in juju.
Description of the change
Never decrement next id in nova testservce
Adjusting the next id downwards is not necessary and can cause breakage
across testcases when cleanup does not exactly match creation, which is
common in juju.
For example:
* TestA creates two rules: next id is 3, rules is {1, 2}
* TestA deletes rule 1: next id is 2, rules is {2}
* TestB creates one rule: boom... only when TestA runs first
To post a comment you must log in.
Reviewers: mp+147208_ code.launchpad. net,
Message:
Please take a look.
Description:
Never decrement next id in nova testservce
Adjusting the next id downwards is not necessary and can cause breakage
across testcases when cleanup does not exactly match creation, which is
common in juju.
For example:
* TestA creates two rules: next id is 3, rules is {1, 2}
* TestA deletes rule 1: next id is 2, rules is {2}
* TestB creates one rule: boom... only when TestA runs first
https:/ /code.launchpad .net/~gz/ goose/never_ decrement_ next_id/ +merge/ 147208
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/7307066/
Affected files: novaservice/ service_ http.go
A [revision details]
M testservices/
Index: [revision details] 20130207052913- e5vfzm0pg3786t9 i
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: testservices/ novaservice/ service_ http.go novaservice/ service_ http.go' novaservice/ service_ http.go 2013-02-04 15:53:04 +0000 novaservice/ service_ http.go 2013-02-07 18:43:34 +0000 yGroup( group.Id) ; err != nil { nse(w, http.StatusAcce pted, nil) yGroupRule( id); err != nil { nse(w, http.StatusAcce pted, nil) r.URL.Path) ; ipId != "os-floating-ips" { gIP(nId) ; err == nil {
writeResponse( w, http.StatusAcce pted, nil)
=== modified file 'testservices/
--- testservices/
+++ testservices/
@@ -847,9 +847,6 @@
if err := n.removeSecurit
return err
}
- if n.nextGroupId > 0 {
- n.nextGroupId--
- }
writeRespo
return nil
} else if err == errNoGroupId {
@@ -914,9 +911,6 @@
if err = n.removeSecurit
return err
}
- if n.nextRuleId > 0 {
- n.nextRuleId--
- }
writeRespo
return nil
}
@@ -976,9 +970,6 @@
if ipId := path.Base(
if nId, err := strconv.Atoi(ipId); err == nil {
if err := n.removeFloatin
- if n.nextIPId > 0 {
- n.nextIPId--
- }
return nil
}