@@ -17,7 +17,6 @@ package memory_test
1717
1818import (
1919 "github.com/cloudfoundry/java-buildpack-memory-calculator/memory"
20- "github.com/cloudfoundry/java-buildpack-memory-calculator/memory/switches"
2120
2221 . "github.com/onsi/ginkgo"
2322 . "github.com/onsi/gomega"
@@ -59,7 +58,6 @@ var _ = Describe("Allocator", func() {
5958 Context ("constructor" , func () {
6059
6160 Context ("with good parameters" , func () {
62-
6361 BeforeEach (func () {
6462 sizes = strmap {
6563 "stack" : "2m" ,
@@ -87,26 +85,6 @@ var _ = Describe("Allocator", func() {
8785 "Bucket{name: native, size: <nil>, range: 0.., weight: 1}" ,
8886 ))
8987 })
90-
91- It ("sets lower bounds and reports switches correctly" , func () {
92- a .SetLowerBounds ()
93-
94- Ω (memory .GetBuckets (a )).Should (ConsistOf (
95- "Bucket{name: stack, size: 2M, range: 2M..2M, weight: 1}" ,
96- "Bucket{name: heap, size: 30M, range: 30M.., weight: 5}" ,
97- "Bucket{name: permgen, size: 10M, range: 10M..10M, weight: 3}" ,
98- "Bucket{name: native, size: 0, range: 0.., weight: 1}" ,
99- ))
100-
101- sws := a .Switches (switches .AllJreSwitchFuns )
102- Ω (sws ).Should (ConsistOf (
103- "-Xmx30M" ,
104- "-Xms30M" ,
105- "-XX:MaxPermSize=10M" ,
106- "-XX:PermSize=10M" ,
107- "-Xss2M" ,
108- )) // heap, permgen, stack
109- })
11088 })
11189 })
11290
@@ -136,6 +114,15 @@ var _ = Describe("Allocator", func() {
136114 It ("fails" , func () {})
137115 })
138116
117+ Context ("with no memory and no buckets" , func () {
118+ BeforeEach (func () {
119+ sizes = strmap {"heap" : "0.." }
120+ weights = floatmap {}
121+ memLimit = memory .MEMSIZE_ZERO
122+ })
123+ It ("fails" , func () {})
124+ })
125+
139126 Context ("with not enough memory and one bucket" , func () {
140127 BeforeEach (func () {
141128 sizes = strmap {"heap" : "64m.." }
@@ -182,17 +169,6 @@ var _ = Describe("Allocator", func() {
182169 })
183170 })
184171
185- Context ("with no memory and no buckets" , func () {
186- BeforeEach (func () {
187- sizes = strmap {"heap" : "0.." }
188- weights = floatmap {}
189- memLimit = memory .MEMSIZE_ZERO
190- })
191- It ("results in no buckets" , func () {
192- Ω (memory .GetBuckets (a )).Should (BeEmpty ())
193- })
194- })
195-
196172 Context ("with single bucket to 'balance'" , func () {
197173
198174 BeforeEach (func () {
0 commit comments