Author: rareddy
Date: 2012-09-14 10:45:21 -0400 (Fri, 14 Sep 2012)
New Revision: 4442
Modified:
trunk/test-integration/common/src/test/java/org/teiid/arquillian/IntegrationTestRestWebserviceGeneration.java
Log:
TEIID-2158: fixing the integration test; as the deploy and undeploy as async operations
sometimes operations from two different tests can overlap and lead to errors.
Modified:
trunk/test-integration/common/src/test/java/org/teiid/arquillian/IntegrationTestRestWebserviceGeneration.java
===================================================================
---
trunk/test-integration/common/src/test/java/org/teiid/arquillian/IntegrationTestRestWebserviceGeneration.java 2012-09-14
13:44:21 UTC (rev 4441)
+++
trunk/test-integration/common/src/test/java/org/teiid/arquillian/IntegrationTestRestWebserviceGeneration.java 2012-09-14
14:45:21 UTC (rev 4442)
@@ -34,8 +34,8 @@
import java.net.URLEncoder;
import org.jboss.arquillian.junit.Arquillian;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.teiid.adminapi.Admin;
@@ -50,22 +50,22 @@
@SuppressWarnings("nls")
public class IntegrationTestRestWebserviceGeneration extends AbstractMMQueryTestCase {
- private Admin admin;
+ private static Admin admin;
- @Before
- public void setup() throws Exception {
+ @BeforeClass
+ public static void setup() throws Exception {
admin = AdminFactory.getInstance().createAdmin("localhost",
9999, "admin", "admin".toCharArray());
+ admin.deploy("sample-vdb.xml",new
FileInputStream(UnitTestUtil.getTestDataFile("sample-vdb.xml")));
}
- @After
- public void teardown() throws AdminException {
+ @AfterClass
+ public static void teardown() throws AdminException {
AdminUtil.cleanUp(admin);
admin.close();
}
@Test
public void testGetOperation() throws Exception {
- admin.deploy("sample-vdb.xml",new
FileInputStream(UnitTestUtil.getTestDataFile("sample-vdb.xml")));
assertTrue(AdminUtil.waitForVDBLoad(admin, "sample", 1, 3));
@@ -83,7 +83,6 @@
@Test
public void testPostOperation() throws Exception {
- admin.deploy("sample-vdb.xml",new
FileInputStream(UnitTestUtil.getTestDataFile("sample-vdb.xml")));
assertTrue(AdminUtil.waitForVDBLoad(admin, "sample", 1, 3));
Show replies by date