我有2个Arquillian测试,它们彼此独立工作,但是当我将它们打包在一起进行部署时,构建失败了。我对arquillian很新,请原谅我,如果这是一个简单的解决方案,但我想知道是否有一种方法可以在测试之间处理Entitymanager。我得出结论,构建的错误可能来自实体管理器,因为我在两个测试类中都声明了一个。有什么想法吗?
我相信这是有问题的错误:
org.jboss.weld.exceptions.DeploymentException: WELD-001409 Ambiguous dependencies for type [EntityManager] wi
th qualifiers [@Default] at injection point [[field] @Inject @RequestScoped protected com.ferguson.sb.dao.Gen
ericDAO.em]. Possible dependencies [[Resource Producer Field [EntityManager] with qualifiers [@Any @Default]
declared as [[field] @PersistenceContext @Produces com.ferguson.sb.dao.UserDAOTestARQ.em], Resource Producer
Field [EntityManager] with qualifiers [@Any @Default] declared as [[field] @PersistenceContext @Produces stat
ic com.ferguson.sb.dao.BdgbranchInfoDaoTestARQ.em]]]