jboss-arquillian

Arquillian Embedded Glassfish Certificate Expired

别来无恙 提交于 2019-11-30 10:05:52
On Aug 14th, the gtecybertrust5ca certifcate used by Glassfish expired causing my Arquillian tests to print errors. This problem is similar to this one: Certificate has expired” in log by starting Glassfish 3.1.2 except, I am using the Embedded version of Glassfish via Maven, Arquillian and SureFire to run unit and integration tests. I have tried instructing Maven to use a local keystore, the one that comes with the JRE, in an effort to keep the expired cert from being used. I verified the expired certificate is not contained within this keystore: C:\Java\jdk1.7.0_25\jre\lib\security>keytool

Embedded Glassfish, security and Arquillian questions

我的未来我决定 提交于 2019-11-30 02:22:54
I want to test my EJBs on an embedded Glassfish using Arquillian. The important thing is that I have to have security up because my bean logic does some programmatic security checking ( sessionContext.isCallerInRole(role) ). Is it possible to simulate a login with Arquillian on an Embedded Glassfish? How do I setup the Embedded Glassfish to use user and role property files? [EDIT] I found a post who's directions I decided to follow ( http://community.jboss.org/message/580290 ) but I still got issues. 1 my arquillian.xml isn't picked up 2 I get warnings concerning @Resource SessionContext 3 I

How to add test classes to an imported ear file and run server side with arquillian?

女生的网名这么多〃 提交于 2019-11-29 22:38:42
问题 I want to create integration tests using arquillian. As deployment i want to use the ear that is also used to deploy in production. So this is my deployment: @Deployment(testable = true) public static Archive<?> createDeployment() { return ShrinkWrap .create(ZipImporter.class, "test.ear") .importFrom(new File("simple-webservice-ear-1.0.0-SNAPSHOT.ear")) .as(EnterpriseArchive.class); } When i run my test class I get a java.lang.ClassNotFoundException because the test class is not found. I know

Injecting EntityManager with a producer in tomcat

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 21:18:11
问题 I am running a project using Hibernate and Weld CDI on tomcat 7. I have write a ServletContextListener to create the EntityManagerFactory and EntityManager during application startup. public class PersistenceListener implements ServletContextListener { private static EntityManagerFactory entityManagerFactory; public void contextInitialized(ServletContextEvent sce){ ServletContext context = sce.getServletContext(); entityManagerFactory = Persistence.createEntityManagerFactory("hibernate-test")

Stream API not working for lazy loaded collections in EclipseLink / Glassfish?

坚强是说给别人听的谎言 提交于 2019-11-29 19:03:55
问题 After detecting a flaw in one of my web services I tracked down the error to the following one-liner: return this.getTemplate().getDomains().stream().anyMatch(domain -> domain.getName().equals(name)); This line was returning false when I positively knew that the list of domains contained a domain which name was equal to the provided name . So after scratching my head for a while, I ended up splitting the whole line to see what was going on. I got the following in my debugging session: Please

Using both Arquillian and PowerMock in the same JUnit test

笑着哭i 提交于 2019-11-29 13:25:42
I would like to use the features of both Arquillian and PowerMock in the same JUnit 4 test. The problem is that both products are JUnit Runner s which should be used with @RunWith , and this is not possible to use multiple @RunWith on the same test class, or to put multiple Runner s class in the same @RunWith annotation. Do you know any way to do that ? Matthew Farwell You can use PowerMock without using the runner if you use the PowerMockRule (which is a TestRule ). From the PowerMockRule: Since version 1.4 it's possible to bootstrap PowerMock using a JUnit Rule instead of using the

Arquillian: Wildfly embedded?

和自甴很熟 提交于 2019-11-29 05:57:59
Until now I had my integration tests running with Arquillian and an embedded Glassfish 4.x. As I suffer from bug ARQ-1458 , I tried migrating to Wildfly 8.0.0.Beta1. My deps in Maven are: <dependency> <groupId>org.jboss.arquillian</groupId> <artifactId>arquillian-bom</artifactId> <version>1.1.2.Final</version> <scope>import</scope> <type>pom</type> </dependency> <dependency> <groupId>org.jboss.arquillian.junit</groupId> <artifactId>arquillian-junit-container</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.wildfly</groupId> <artifactId>wildfly-arquillian-container

Adding all Maven dependencies to Arquillian

[亡魂溺海] 提交于 2019-11-28 17:04:38
How do you add all dependencies in the POM to arquillian? Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies() .as(File.class); I found that line, but I Maven is red in intellij because it doesn't find the class. I don't know which dependencies I need. Or are there better ways? Adding Arquillian dependencies Add Arquillian dependencies to your pom.xml : <dependencyManagement> <dependencies> <dependency> <groupId>org.jboss.arquillian</groupId> <artifactId>arquillian-bom</artifactId> <version>1.1.8.Final</version> <scope>import</scope> <type>pom</type> </dependency> <

Using both Arquillian and PowerMock in the same JUnit test

爷,独闯天下 提交于 2019-11-28 07:22:37
问题 I would like to use the features of both Arquillian and PowerMock in the same JUnit 4 test. The problem is that both products are JUnit Runner s which should be used with @RunWith , and this is not possible to use multiple @RunWith on the same test class, or to put multiple Runner s class in the same @RunWith annotation. Do you know any way to do that ? 回答1: You can use PowerMock without using the runner if you use the PowerMockRule (which is a TestRule). From the PowerMockRule: Since version

Arquillian: Wildfly embedded?

强颜欢笑 提交于 2019-11-27 23:30:56
问题 Until now I had my integration tests running with Arquillian and an embedded Glassfish 4.x. As I suffer from bug ARQ-1458, I tried migrating to Wildfly 8.0.0.Beta1. My deps in Maven are: <dependency> <groupId>org.jboss.arquillian</groupId> <artifactId>arquillian-bom</artifactId> <version>1.1.2.Final</version> <scope>import</scope> <type>pom</type> </dependency> <dependency> <groupId>org.jboss.arquillian.junit</groupId> <artifactId>arquillian-junit-container</artifactId> <scope>test</scope> <