From 23dcf4339d1dc102b2c509a151734f4caff793bd Mon Sep 17 00:00:00 2001 From: Björn Höfling Date: Sat, 27 Feb 2021 22:57:11 +0100 Subject: gnu: java-snappy: Fix checks when build machine has too much memory. * gnu/packages/java-compression.scm (java-snappy)[arguments]: Add set-test-memory-size phase. This fixes . Thanks to zimoun for the solving idea. The CachingBufferPoolTest tries to allocate a lot of memory (20GB) and the test succeeds if there is not enough memory available in the JVM. When the build machine has a lot of memory (which is the case on the Guix CI system), the JVM will use more than 20GB as maximum heap size. In consequence, the test fails. The new phase adds a maxmemory size of 2G for the tests. Thus all other tests will have enough memory and the CachingBufferPoolTest will fail. --- gnu/packages/java-compression.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/packages/java-compression.scm b/gnu/packages/java-compression.scm index 654d138c33..5f653bcc94 100644 --- a/gnu/packages/java-compression.scm +++ b/gnu/packages/java-compression.scm @@ -99,6 +99,11 @@ (copy-recursively "src/main/resources/org/xerial/snappy/native" "build/classes/org/xerial/snappy/native") #t)) + (add-before 'build 'set-test-memory-size + (lambda _ + (substitute* "build.xml" + (("