Hudson CI:无法测试 grails-app
我已经尝试了各种方法来使用 hudson 测试 grails-app。我尝试过使用 maven 进行测试,我尝试过使用 grails 插件进行测试,并且 我尝试过使用 shell 构建器进行测试 似乎通过 shell 进行构建是唯一有效的方法..
每次我得到同样的错误:
org.hibernate.HibernateException: 包含在没有激活的情况下无效 交易
但是如果我进入 shell 并输入
grails 测试应用
一切运行良好。 有人知道发生了什么事吗?
我使用 CentOS 和 Java 1.6,没有从站,只是在 Tomcat6 上进行简单的 hudson 部署。 我已经尝试过 maven 和 grails builder,但都失败了。
编辑:似乎如果我在同一个命令上运行单元测试和集成测试(无论是使用 grails 还是使用 mvn),集成测试总是会失败。
I've tried in each and every way to test a grails-app using hudson. I've tried testing with maven, I've tried testing with the grails plugin and I've tried testing with a shell builder it seems that building via shell is the only thing that works..
Every time I get the same error:
org.hibernate.HibernateException:
contains is not valid without active
transaction
But If i go to a shell and type
grails test-app
everything runs fine.
Does anyone have any idea on what's going on?
I'm using CentOS with Java 1.6, no slaves, just a simple hudson deploy over Tomcat6.
I've tried both with maven and grails builder, both fail.
Edit: it seems that if I run both unit and integration tests on the same command (either with grails or with mvn) the integration tests fail always.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Hudson/Jenkins 通常只使用命令行来执行 grails 插件(您应该能够从构建输出中确认这一点)。您可能可以添加一个预构建步骤来转储环境,这样您就可以查看那里(或您自己的 shell 中)是否有任何东西导致它根本不同。
否则,尝试以 hudson 用户身份登录并找到 hudson 工作区并手动重复该过程。这是调试此类难题的最简单方法。
问候
Hudson/Jenkins usually just use the command line for executing grails plugins (You should be able to confirm that from the build output). You could probably add a pre build step to dump the environment, so you can see if anything there (or in your own shell) cause it to be fundamentally different.
Otherwise try to log in as the hudson user and find the hudson workspace and repeat the process manually. That has been the easiest way to debug hard problems like this..
regards