蚂蚁使用JUnit的任务 - 的OutOfMemoryError [英] Ant with JUnit task - OutOfMemoryError

查看:185
本文介绍了蚂蚁使用JUnit的任务 - 的OutOfMemoryError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个有趣的问题。我使用Ant它通过的build.xml元素执行JUnit测试(测试套件由具有50测试)。问题是,我收到的OutOfMemoryError。

I have an interesting problem. I am using Ant which executes JUnit tests (test suite composed with 50 tests) via build.xml element. The problem is that I receive OutOfMemoryError.

我已经扩大了堆空间使用ANT_OPTS论点,但它并没有帮助。当我在Eclipse中执行相同的测试套件 - 一切都很好 - 内存被释放感谢GC。

I have enlarged heap space using ANT_OPTS arguments but it did not help. When I execute the same test suite in Eclipse - everything is fine - memory is released thanks to GC.

我认为这个问题涉及到Ant和它的JUnit任务。

I think that this problem is related to Ant and its JUnit task.

也许记录的测试是原因(但另一方面我有printsummary =假,[说不定outputtoformatters应设置为假,以及???])

Maybe logging of the tests are the reason(but on the other hand I have printsummary="false", [maybe outputtoformatters should be set to false as well???]).

我的第二个猜测是,TEST ***。xml文件(在测试结束时产生)保存在内存中,并在测试结束冲洗。有什么办法来减少日志这是在这个文件?

My second guess is that TEST***.xml file (generated at the end of the test) is held in memory and flushed at the end of the test. Is there any way to reduce logs which are in that file?

大家好,请给我一些线索。

Guys, please give me some clues.

推荐答案

来总结我想说的是,这些问题的根源被记录。日志被送到流并不会刷新。切换注销后 - 一切都很好。

to sum up I want to say that the root of the problems was logging. Logs were sent to the stream and not flushed. After switching the logs off - everything was fine.

这篇关于蚂蚁使用JUnit的任务 - 的OutOfMemoryError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆