コード例 #1
0
			Context("when the specified maximum memory sizes imply the total memory size may be too large", func() {

				BeforeEach(func() {
					sizes = strmap{"heap": "800m", "permgen": "800m"}
					weights = floatmap{"heap": 5.0, "permgen": 3.0, "stack": 1.0, "native": 1.0}
					memLimit = memory.NewMemSize(4 * gIGA)
				})

				It("sets the heap and permgen", func() {
					bucks := memory.GetBuckets(a)
					Ω(bucks).Should(ContainElement(
						"Bucket{name: permgen, size: 800M, range: 800M..800M, weight: 3}"))
					Ω(bucks).Should(ContainElement(
						"Bucket{name: heap, size: 800M, range: 800M..800M, weight: 5}"))
					Ω(a.GetWarnings()).Should(ConsistOf("There is more than 3 times more spare native memory than the default so configured Java memory may be too small or available memory may be too large"))
				})

			})

			Context("when the specified maximum memory sizes imply the total memory size may be too large", func() {

				BeforeEach(func() {
					sizes = strmap{"heap": "800m", "permgen": "800m"}
					weights = floatmap{"heap": 5.0, "permgen": 3.0, "stack": 1.0, "native": 1.0}
					memLimit = memory.NewMemSize(4 * gIGA)
				})

				It("sets the heap and permgen and issues a warning", func() {
					bucks := memory.GetBuckets(a)
					Ω(bucks).Should(ContainElement(