Weld SVN: r5549 - cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb.
by weld-commits@lists.jboss.org
Author: dallen6
Date: 2010-01-21 13:48:44 -0500 (Thu, 21 Jan 2010)
New Revision: 5549
Removed:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/Bird.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/BirdFeederService.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/CommonKingfisher.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/FeederService.java
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/EJBApplicationContextTest.java
Log:
Backport CDITCK-60
Deleted: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/Bird.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/Bird.java 2010-01-21 18:11:55 UTC (rev 5548)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/Bird.java 2010-01-21 18:48:44 UTC (rev 5549)
@@ -1,9 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.application.ejb;
-
-import javax.ejb.Local;
-
-@Local
-public interface Bird
-{
- public void eat();
-}
Deleted: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/BirdFeederService.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/BirdFeederService.java 2010-01-21 18:11:55 UTC (rev 5548)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/BirdFeederService.java 2010-01-21 18:48:44 UTC (rev 5549)
@@ -1,37 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.application.ejb;
-
-import javax.ejb.Stateless;
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.inject.Inject;
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-
-@Stateless
-@WebService
-public class BirdFeederService implements FeederService
-{
- @Inject
- private BeanManager jsr299Manager;
-
- private static boolean applicationScopeActive = false;
-
- @WebMethod
- public void refillFood()
- {
- if (jsr299Manager.getContext(ApplicationScoped.class).isActive())
- {
- applicationScopeActive = true;
- }
- else
- {
- applicationScopeActive = false;
- }
- }
-
- public boolean adequateFood()
- {
- return applicationScopeActive;
- }
-
-}
Deleted: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/CommonKingfisher.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/CommonKingfisher.java 2010-01-21 18:11:55 UTC (rev 5548)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/CommonKingfisher.java 2010-01-21 18:48:44 UTC (rev 5549)
@@ -1,18 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.application.ejb;
-
-import javax.ejb.Stateless;
-import javax.xml.ws.WebServiceRef;
-
-@Stateless
-public class CommonKingfisher implements Bird
-{
-
- @WebServiceRef
- private FeederService birdFeeder;
-
- public void eat()
- {
- birdFeeder.refillFood();
- }
-
-}
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/EJBApplicationContextTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/EJBApplicationContextTest.java 2010-01-21 18:11:55 UTC (rev 5548)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/EJBApplicationContextTest.java 2010-01-21 18:48:44 UTC (rev 5549)
@@ -21,18 +21,6 @@
public class EJBApplicationContextTest extends AbstractJSR299Test
{
- @Test(groups = { "rewrite", "contexts", "webservice", "integration", "broken" })
- @SpecAssertion(section = "6.7.3", id = "b")
- // CDITCK-60
- public void testApplicationScopeActiveDuringWebServiceInvocation()
- {
- //TODO This test might work better with a separate client over HTTP
- FeederService birdFeeder = getInstanceByType(FeederService.class);
- Bird bird = getInstanceByType(Bird.class);
- bird.eat();
- assert birdFeeder.adequateFood();
- }
-
@Test(groups = { "contexts", "ejb3", "integration" })
@SpecAssertion(section = "6.7.3", id = "dc")
public void testApplicationScopeActiveDuringCallToEjbTimeoutMethod() throws Exception
Deleted: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/FeederService.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/FeederService.java 2010-01-21 18:11:55 UTC (rev 5548)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/FeederService.java 2010-01-21 18:48:44 UTC (rev 5549)
@@ -1,10 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.application.ejb;
-
-import javax.ejb.Local;
-
-@Local
-public interface FeederService
-{
- public void refillFood();
- public boolean adequateFood();
-}
16 years, 2 months
Weld SVN: r5548 - cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb.
by weld-commits@lists.jboss.org
Author: dallen6
Date: 2010-01-21 13:11:55 -0500 (Thu, 21 Jan 2010)
New Revision: 5548
Removed:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/Bird.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/BirdFeederService.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/CommonKingfisher.java
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/FeederService.java
Modified:
cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/EJBApplicationContextTest.java
Log:
CDITCK-60
Deleted: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/Bird.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/Bird.java 2010-01-21 16:13:40 UTC (rev 5547)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/Bird.java 2010-01-21 18:11:55 UTC (rev 5548)
@@ -1,9 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.application.ejb;
-
-import javax.ejb.Local;
-
-@Local
-public interface Bird
-{
- public void eat();
-}
Deleted: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/BirdFeederService.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/BirdFeederService.java 2010-01-21 16:13:40 UTC (rev 5547)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/BirdFeederService.java 2010-01-21 18:11:55 UTC (rev 5548)
@@ -1,37 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.application.ejb;
-
-import javax.ejb.Stateless;
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.inject.Inject;
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-
-@Stateless
-@WebService
-public class BirdFeederService implements FeederService
-{
- @Inject
- private BeanManager jsr299Manager;
-
- private static boolean applicationScopeActive = false;
-
- @WebMethod
- public void refillFood()
- {
- if (jsr299Manager.getContext(ApplicationScoped.class).isActive())
- {
- applicationScopeActive = true;
- }
- else
- {
- applicationScopeActive = false;
- }
- }
-
- public boolean adequateFood()
- {
- return applicationScopeActive;
- }
-
-}
Deleted: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/CommonKingfisher.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/CommonKingfisher.java 2010-01-21 16:13:40 UTC (rev 5547)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/CommonKingfisher.java 2010-01-21 18:11:55 UTC (rev 5548)
@@ -1,18 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.application.ejb;
-
-import javax.ejb.Stateless;
-import javax.xml.ws.WebServiceRef;
-
-@Stateless
-public class CommonKingfisher implements Bird
-{
-
- @WebServiceRef
- private FeederService birdFeeder;
-
- public void eat()
- {
- birdFeeder.refillFood();
- }
-
-}
Modified: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/EJBApplicationContextTest.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/EJBApplicationContextTest.java 2010-01-21 16:13:40 UTC (rev 5547)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/EJBApplicationContextTest.java 2010-01-21 18:11:55 UTC (rev 5548)
@@ -20,17 +20,6 @@
@SpecVersion(spec="cdi", version="20091101")
public class EJBApplicationContextTest extends AbstractJSR299Test
{
- @Test(groups = { "rewrite", "contexts", "webservice", "integration", "jboss-as-broken" })
- @SpecAssertion(section = "6.7.3", id = "b")
- public void testApplicationScopeActiveDuringWebServiceInvocation()
- {
- //TODO This test might work better with a separate client over HTTP
- FeederService birdFeeder = getInstanceByType(FeederService.class);
- Bird bird = getInstanceByType(Bird.class);
- bird.eat();
- assert birdFeeder.adequateFood();
- }
-
@Test(groups = { "contexts", "ejb3", "integration" })
@SpecAssertion(section = "6.7.3", id = "dc")
public void testApplicationScopeActiveDuringCallToEjbTimeoutMethod() throws Exception
Deleted: cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/FeederService.java
===================================================================
--- cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/FeederService.java 2010-01-21 16:13:40 UTC (rev 5547)
+++ cdi-tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ejb/FeederService.java 2010-01-21 18:11:55 UTC (rev 5548)
@@ -1,10 +0,0 @@
-package org.jboss.jsr299.tck.tests.context.application.ejb;
-
-import javax.ejb.Local;
-
-@Local
-public interface FeederService
-{
- public void refillFood();
- public boolean adequateFood();
-}
16 years, 2 months
Weld SVN: r5547 - in ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess: test/selenium and 1 other directory.
by weld-commits@lists.jboss.org
Author: mgencur(a)redhat.com
Date: 2010-01-21 11:13:40 -0500 (Thu, 21 Jan 2010)
New Revision: 5547
Modified:
ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess/clustertest/selenium/NumberGuessClusteringTest.java
ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess/test/selenium/CommonNumberGuessTest.java
Log:
WELD-396 minor test fixes
Modified: ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess/clustertest/selenium/NumberGuessClusteringTest.java
===================================================================
--- ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess/clustertest/selenium/NumberGuessClusteringTest.java 2010-01-21 15:19:48 UTC (rev 5546)
+++ ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess/clustertest/selenium/NumberGuessClusteringTest.java 2010-01-21 16:13:40 UTC (rev 5547)
@@ -116,7 +116,7 @@
int numberOfGuesses = 3;
int guess = 0;
- //enter several guesses
+ //enter several guesses (3)
while (true){
while (isOnGuessPage(browser) && guess < numberOfGuesses)
{
@@ -144,7 +144,10 @@
while (isOnGuessPage(browser))
{
deleteCookies(browser);
- if (i > 7)
+ /*3+8 = 11 -> even though we have 10 attempts, it is possible to enter value 11 times, but
+ the 11th time it is actually not guessing but only validating that 10 times has gone and the game
+ is finished (no 11th guessing)*/
+ if (i >= 8)
{
fail("Game should not be longer than 7 guesses in the second browser after failover");
}
Modified: ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess/test/selenium/CommonNumberGuessTest.java
===================================================================
--- ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess/test/selenium/CommonNumberGuessTest.java 2010-01-21 15:19:48 UTC (rev 5546)
+++ ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess/test/selenium/CommonNumberGuessTest.java 2010-01-21 16:13:40 UTC (rev 5547)
@@ -67,7 +67,7 @@
while (isOnGuessPage())
{
- if (i > 9)
+ if (i > 10)
{
fail("Game should not be longer than 10 guesses");
}
16 years, 2 months
Weld SVN: r5546 - in ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess: clustertest and 1 other directories.
by weld-commits@lists.jboss.org
Author: mgencur(a)redhat.com
Date: 2010-01-21 10:19:48 -0500 (Thu, 21 Jan 2010)
New Revision: 5546
Added:
ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess/clustertest/
ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess/clustertest/selenium/
ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess/clustertest/selenium/NumberGuessClusteringTest.java
Log:
WELD-396 functional test for numberguess example in cluster
Added: ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess/clustertest/selenium/NumberGuessClusteringTest.java
===================================================================
--- ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess/clustertest/selenium/NumberGuessClusteringTest.java (rev 0)
+++ ftest/numberguess/trunk/src/main/java/org/jboss/weld/example/numberguess/clustertest/selenium/NumberGuessClusteringTest.java 2010-01-21 15:19:48 UTC (rev 5546)
@@ -0,0 +1,253 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.weld.example.numberguess.clustertest.selenium;
+
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.fail;
+
+import java.io.IOException;
+
+import org.jboss.weld.example.common.test.selenium.WeldSelenium;
+import org.jboss.weld.example.common.test.selenium.WeldSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * This class tests Weld numberguess example in a cluster. Two instances of JBoss AS are
+ * being used. First part of test is executed at first (master) instance. Then the first
+ * instance is killed and a second (slave) instance takes over executing of the application.
+ * This behaviour simulates recovery from breakdown and session replication.
+ *
+ * The first version of application server that can be used is JBoss 6.0.0.M1, nevertheless this
+ * version of AS has to be updated with current version of Weld core.
+ *
+ * Prior to executing this test it is needed to start both JBoss AS instances manually.
+ * For example (assuming you have created second "all" configuration ("all2")):
+ * ./run.sh -c all -g DocsPartition -u 239.255.101.101 -b localhost -Djboss.messaging.ServerPeerID=1
+ * -Djboss.service.binding.set=ports-default
+ * ./run.sh -c all2 -g DocsPartition -u 239.255.101.101 -b localhost -Djboss.messaging.ServerPeerID=2
+ * -Djboss.service.binding.set=ports-01
+ * The configuration all is considered to be master jboss instance (related to
+ * jboss.service.binding.set=ports-default) and the application is deployed to farm directory under
+ * chosen jboss configuration directory specified with jboss.master.configuration property.
+ *
+ *
+ * @author mgencur
+ * @author kpiwko
+ *
+ */
+public class NumberGuessClusteringTest extends WeldSeleniumTest
+{
+
+ protected String MAIN_PAGE = "/home.jsf";
+ protected String GUESS_MESSAGES = "id=numberGuess:messages";
+ protected String GUESS_STATUS = "xpath=//div[contains(text(),'I'm thinking of ')]";
+
+ protected String GUESS_FIELD = "id=numberGuess:inputGuess";
+ protected String GUESS_FIELD_WITH_VALUE = "xpath=//input[@id='numberGuess:inputGuess'][@value=3]";
+
+ protected String GUESS_SUBMIT = "id=numberGuess:guessButton";
+ protected String GUESS_RESTART = "id=numberGuess:restartButton";
+ protected String GUESS_SMALLEST = "id=numberGuess:smallest";
+ protected String GUESS_BIGGEST = "id=numberGuess:biggest";
+
+ protected String WIN_MSG = "Correct!";
+ protected String LOSE_MSG = "No guesses left!";
+ protected String HIGHER_MSG = "Higher!";
+
+ private final String SECOND_INSTANCE_BROWSER_URL = "http://localhost:8180";
+ private final long JBOSS_SHUTDOWN_TIMEOUT = 20000;
+
+ private WeldSelenium browser2;
+
+ @BeforeMethod(dependsOnGroups = "seleniumSetUp")
+ public void open()
+ {
+ browser.open(contextPath + MAIN_PAGE);
+ browser.waitForPageToLoad();
+ deleteCookies(browser);
+ browser2 = startSecondBrowser();
+ deleteCookies(browser2);
+ }
+
+ @Test
+ public void guessingWithFailoverTest()
+ {
+ preFailurePart(browser);
+
+ String newAddress = getAddressForSecondInstance(browser);
+
+ shutdownMasterJBossInstance();
+
+ browser2.open(newAddress);
+
+ assertTrue(browser2.isTextPresent(HIGHER_MSG), "Page should contain message Higher!");
+ assertEquals(Integer.parseInt(browser.getText(GUESS_SMALLEST)),4, "Page should contain smallest number equal to 4");
+ assertEquals(Integer.parseInt(browser.getText(GUESS_BIGGEST)),100, "Page should contain biggest number equal to 100");
+ assertTrue(browser2.isElementPresent(GUESS_FIELD_WITH_VALUE), "Page should contain input field with value of 3");
+
+ postFailurePart(browser2);
+
+ assertTrue(isOnWinPage(browser2), "Win page expected after playing smart.");
+ }
+
+ protected void preFailurePart(WeldSelenium browser)
+ {
+ int numberOfGuesses = 3;
+ int guess = 0;
+
+ //enter several guesses
+ while (true){
+ while (isOnGuessPage(browser) && guess < numberOfGuesses)
+ {
+ enterGuess(browser, ++guess);
+ }
+
+ //we always want to enter at least 3 guesses so that we can continue in the other browser window with expected results
+ if (guess < numberOfGuesses)
+ {
+ resetForm(browser);
+ guess = 0;
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+
+ protected void postFailurePart(WeldSelenium browser)
+ {
+ int min, max, guess;
+ int i = 0;
+
+ while (isOnGuessPage(browser))
+ {
+ deleteCookies(browser);
+ if (i > 7)
+ {
+ fail("Game should not be longer than 7 guesses in the second browser after failover");
+ }
+
+ assertTrue(browser.isElementPresent(GUESS_SMALLEST), "Expected smallest number on page");
+ assertTrue(browser.isElementPresent(GUESS_BIGGEST), "Expected biggest number on page");
+
+ min = Integer.parseInt(browser.getText(GUESS_SMALLEST));
+ max = Integer.parseInt(browser.getText(GUESS_BIGGEST));
+ guess = min + ((max - min) / 2);
+ enterGuess(browser, guess);
+ i++;
+ }
+ }
+
+ protected void resetForm(WeldSelenium browser)
+ {
+ browser.click(GUESS_RESTART);
+ browser.waitForPageToLoad();
+ }
+
+ protected void enterGuess(WeldSelenium browser, int guess)
+ {
+ browser.type(GUESS_FIELD, String.valueOf(guess));
+ browser.click(GUESS_SUBMIT);
+ browser.waitForPageToLoad();
+ }
+
+ protected boolean isOnGuessPage(WeldSelenium browser)
+ {
+ return !(isOnWinPage(browser) || isOnLosePage(browser));
+ }
+
+ protected boolean isOnWinPage(WeldSelenium browser)
+ {
+ String text = browser.getText(GUESS_MESSAGES);
+ return WIN_MSG.equals(text);
+ }
+
+ protected boolean isOnLosePage(WeldSelenium browser)
+ {
+ String text = browser.getText(GUESS_MESSAGES);
+ return LOSE_MSG.equals(text);
+ }
+
+ public WeldSelenium startSecondBrowser()
+ {
+ String url = SECOND_INSTANCE_BROWSER_URL;
+ return super.startBrowser(super.host, super.port, super.browserType, url);
+ }
+
+ public String getAddressForSecondInstance(WeldSelenium browser)
+ {
+ String loc = browser.getLocation();
+ String[] parsedStrings = loc.split("/");
+ StringBuilder sb = new StringBuilder();
+ for (int i = 3; i != parsedStrings.length; i++){
+ sb.append("/").append(parsedStrings[i]);
+ }
+
+ String sid;
+ if (browser.isCookiePresent("JSESSIONID"))
+ {
+ sid = browser.getCookieByName("JSESSIONID");
+ }
+ else
+ {
+ //get sessionid directly from browser URL if JSESSIONID cookie is not present
+ sid = loc.substring(loc.indexOf("jsessionid=") + "jsessionid=".length(), loc.length());
+ }
+
+ String newAddress = sb.toString();
+ String firstPart = newAddress.substring(0, newAddress.indexOf(";"));
+
+ //construct a new address for second browser
+ newAddress = firstPart + ";jsessionid=" + sid;
+
+ return newAddress;
+ }
+
+ private void deleteCookies(WeldSelenium browser)
+ {
+ if (browser.isCookiePresent("JSESSIONID"))
+ {
+ browser.deleteCookie("JSESSIONID", "path=" + contextPath + ", domain=localhost, recurse=true");
+ }
+ }
+
+ public void shutdownMasterJBossInstance()
+ {
+ String command = super.jbossConfig + "/../../bin/shutdown.sh -s localhost:1099 -S";
+ try
+ {
+ Process process = Runtime.getRuntime().exec(command);
+ process.waitFor();
+ Thread.sleep(JBOSS_SHUTDOWN_TIMEOUT);
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException(e.getCause());
+ }
+ catch (InterruptedException e)
+ {
+ }
+ }
+}
16 years, 2 months
Weld SVN: r5545 - ftest/common/trunk/src/main/java/org/jboss/weld/example/common/test/selenium.
by weld-commits@lists.jboss.org
Author: mgencur(a)redhat.com
Date: 2010-01-21 10:17:56 -0500 (Thu, 21 Jan 2010)
New Revision: 5545
Modified:
ftest/common/trunk/src/main/java/org/jboss/weld/example/common/test/selenium/WeldSeleniumTest.java
Log:
WELD-396 added changes to be able to run tests in cluster including second web browser
Modified: ftest/common/trunk/src/main/java/org/jboss/weld/example/common/test/selenium/WeldSeleniumTest.java
===================================================================
--- ftest/common/trunk/src/main/java/org/jboss/weld/example/common/test/selenium/WeldSeleniumTest.java 2010-01-21 15:14:38 UTC (rev 5544)
+++ ftest/common/trunk/src/main/java/org/jboss/weld/example/common/test/selenium/WeldSeleniumTest.java 2010-01-21 15:17:56 UTC (rev 5545)
@@ -38,18 +38,29 @@
protected WeldSelenium browser;
protected String contextPath;
protected String basedir;
+
+ protected String host;
+ protected int port;
+ protected String browserType;
+ protected String browserUrl;
+ protected String jbossConfig;
@BeforeMethod(groups={"seleniumSetUp"})
- @Parameters( { "selenium.server.host", "selenium.server.port", "selenium.browser", "selenium.browser.url", "selenium.speed", "selenium.timeout", "example.context.path", "basedir" })
- public void setUp(String host, String port, String browserType, String browserUrl, String speed, String timeout, @Optional("") String contextPath, String basedir)
+ @Parameters( { "selenium.server.host", "selenium.server.port", "selenium.browser", "selenium.browser.url", "selenium.speed", "selenium.timeout", "example.context.path", "basedir", "jboss.config" })
+ public void setUp(String host, String port, String browserType, String browserUrl, String speed, String timeout, @Optional("") String contextPath, String basedir, @Optional("") String jbossConfig)
{
- browser = startBrowser(host, Integer.parseInt(port), browserType, browserUrl);
+ this.host = host;
+ this.port = Integer.parseInt(port);
+ this.browserType = browserType;
+ this.browserUrl = browserUrl;
+ this.contextPath = contextPath;
+ this.basedir = basedir;
+ this.jbossConfig = jbossConfig;
+
+ browser = startBrowser(this.host, this.port, this.browserType, this.browserUrl);
browser.allowNativeXpath("false");
browser.setSpeed(speed);
- browser.setTimeout(timeout);
-
- this.contextPath = contextPath;
- this.basedir = basedir;
+ browser.setTimeout(timeout);
}
// This is stopped automatically by listener
16 years, 2 months
Weld SVN: r5544 - in examples/trunk: jsf/numberguess and 3 other directories.
by weld-commits@lists.jboss.org
Author: mgencur(a)redhat.com
Date: 2010-01-21 10:14:38 -0500 (Thu, 21 Jan 2010)
New Revision: 5544
Added:
examples/trunk/jsf/numberguess/src/test/selenium/jboss6x-cluster.xml
Modified:
examples/trunk/jsf/numberguess/pom.xml
examples/trunk/jsf/numberguess/src/main/java/org/jboss/weld/examples/numberguess/Game.java
examples/trunk/jsf/numberguess/src/main/webapp-jboss5/WEB-INF/web.xml
examples/trunk/pom.xml
Log:
WELD-396 added changes for running and testing examples in cluster
Modified: examples/trunk/jsf/numberguess/pom.xml
===================================================================
--- examples/trunk/jsf/numberguess/pom.xml 2010-01-20 23:24:43 UTC (rev 5543)
+++ examples/trunk/jsf/numberguess/pom.xml 2010-01-21 15:14:38 UTC (rev 5544)
@@ -59,6 +59,11 @@
<activation>
<activeByDefault>true</activeByDefault>
</activation>
+
+ <properties>
+ <distributable.flag></distributable.flag>
+ </properties>
+
<dependencies>
<dependency>
@@ -96,7 +101,7 @@
<webResources>
<resource>
<directory>src/main/webapp-jboss5</directory>
- <filtering>false</filtering>
+ <filtering>true</filtering>
</resource>
</webResources>
</configuration>
@@ -104,7 +109,62 @@
</plugins>
</build>
</profile>
+
<profile>
+ <id>jboss6cluster</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+
+ <properties>
+ <distributable.flag><distributable/></distributable.flag>
+ </properties>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>jsr250-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.glassfish.web</groupId>
+ <artifactId>el-impl</artifactId>
+ <scope>runtime</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>src/main/webapp-jboss5</directory>
+ <filtering>true</filtering>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>tomcat</id>
<dependencies>
@@ -530,6 +590,47 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>ftest-jboss-cluster-60</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+
+ <properties>
+ <ftest.artifact>ftest-numberguess</ftest.artifact>
+ <ftest.version>0.1${ftest.version.discriminator}</ftest.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.weld.examples.ftest</groupId>
+ <artifactId>${ftest.artifact}</artifactId>
+ <version>${ftest.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>failsafe-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
<build>
Modified: examples/trunk/jsf/numberguess/src/main/java/org/jboss/weld/examples/numberguess/Game.java
===================================================================
--- examples/trunk/jsf/numberguess/src/main/java/org/jboss/weld/examples/numberguess/Game.java 2010-01-20 23:24:43 UTC (rev 5543)
+++ examples/trunk/jsf/numberguess/src/main/java/org/jboss/weld/examples/numberguess/Game.java 2010-01-21 15:14:38 UTC (rev 5544)
@@ -97,7 +97,7 @@
public void validateNumberRange(FacesContext context, UIComponent toValidate, Object value)
{
- if (remainingGuesses <= 1)
+ if (remainingGuesses <= 0)
{
FacesMessage message = new FacesMessage("No guesses left!");
context.addMessage(toValidate.getClientId(context), message);
Modified: examples/trunk/jsf/numberguess/src/main/webapp-jboss5/WEB-INF/web.xml
===================================================================
--- examples/trunk/jsf/numberguess/src/main/webapp-jboss5/WEB-INF/web.xml 2010-01-20 23:24:43 UTC (rev 5543)
+++ examples/trunk/jsf/numberguess/src/main/webapp-jboss5/WEB-INF/web.xml 2010-01-21 15:14:38 UTC (rev 5544)
@@ -6,6 +6,8 @@
http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ ${distributable.flag}
+
<display-name>Web Beans Numberguess example</display-name>
<context-param>
Added: examples/trunk/jsf/numberguess/src/test/selenium/jboss6x-cluster.xml
===================================================================
--- examples/trunk/jsf/numberguess/src/test/selenium/jboss6x-cluster.xml (rev 0)
+++ examples/trunk/jsf/numberguess/src/test/selenium/jboss6x-cluster.xml 2010-01-21 15:14:38 UTC (rev 5544)
@@ -0,0 +1,29 @@
+
+ <!--
+ JBoss, Home of Professional Open Source Copyright 2008, Red Hat
+ Middleware LLC, and individual contributors by the @authors tag. See
+ the copyright.txt in the distribution for a full listing of individual
+ contributors. This is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version. This software is
+ distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details. You should have received a copy of the GNU
+ Lesser General Public License along with this software; if not, write
+ to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ Boston, MA 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+<suite name="Weld JSF Numberguess example" verbose="2" parallel="false">
+ <listeners>
+ <listener class-name="org.jboss.weld.example.common.test.selenium.WeldFunctionalTestListener" />
+ </listeners>
+ <test name="numberguess_cluster_jboss5">
+ <parameter name="example.context.path" value="/weld-numberguess" />
+ <packages>
+ <package name="org.jboss.weld.example.numberguess.clustertest.selenium" />
+ </packages>
+ </test>
+</suite>
Property changes on: examples/trunk/jsf/numberguess/src/test/selenium/jboss6x-cluster.xml
___________________________________________________________________
Name: svn:executable
+ *
Modified: examples/trunk/pom.xml
===================================================================
--- examples/trunk/pom.xml 2010-01-20 23:24:43 UTC (rev 5543)
+++ examples/trunk/pom.xml 2010-01-21 15:14:38 UTC (rev 5544)
@@ -109,6 +109,7 @@
<selenium.speed>0</selenium.speed>
<selenium.timeout>30000</selenium.timeout>
<selenium.debug>false</selenium.debug>
+ <application.deploy.timeout>300</application.deploy.timeout>
</properties>
<!-- Dependency management, including any extra repositories needed -->
@@ -701,6 +702,226 @@
</pluginManagement>
</build>
</profile>
+
+ <profile>
+ <id>ftest-jboss-cluster-60</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>repository.codehaus.repository</id>
+ <url>http://repository.codehaus.org/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <properties>
+ <ftest.testsuite>jboss6x-cluster.xml</ftest.testsuite>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.seleniumhq.selenium.client-drivers</groupId>
+ <artifactId>selenium-java-client-driver</artifactId>
+ <version>${selenium.java.client.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <!-- get functional tests from ftest artifact -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-ftest</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/ftest</outputDirectory>
+ <stripVersion>true</stripVersion>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.weld.examples.ftest</groupId>
+ <artifactId>${ftest.artifact}</artifactId>
+ <overWrite>true</overWrite>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!-- start Selenium server -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ <version>${selenium.maven.plugin.version}</version>
+ <executions>
+ <execution>
+ <id>start-selenium</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start-server</goal>
+ </goals>
+ <configuration>
+ <background>true</background>
+ <port>${selenium.server.port}</port>
+ <logOutput>true</logOutput>
+ <logFile>${project.build.directory}/selenium/selenium-server.log</logFile>
+ <browserSideLog>${selenium.debug}</browserSideLog>
+ <debug>${selenium.debug}</debug>
+ </configuration>
+ </execution>
+ <!--
+ this can't be used until plugin sends the
+ right command, using Ant GET instead
+ -->
+ <!--
+ <execution> <id>stop-selenium</id>
+ <phase>post-integration-test</phase> <goals>
+ <goal>stop-server</goal> </goals>
+ <configuration>
+ <port>${selenium.server.port}</port>
+ </configuration> </execution>
+ -->
+ </executions>
+ </plugin>
+
+ <!-- run functional tests -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>failsafe-maven-plugin</artifactId>
+ <version>${failsafe.maven.plugin.version}</version>
+ <configuration>
+ <testClassesDirectory>${project.build.directory}/ftest</testClassesDirectory>
+ <suiteXmlFiles>
+ <suiteXmlFile>src/test/selenium/${ftest.testsuite}</suiteXmlFile>
+ </suiteXmlFiles>
+ <argLine>-Xmx748m</argLine>
+ <forkMode>once</forkMode>
+ <systemProperties>
+ <property>
+ <name>selenium.server.port</name>
+ <value>${selenium.server.port}</value>
+ </property>
+ <property>
+ <name>selenium.server.host</name>
+ <value>${selenium.server.host}</value>
+ </property>
+ <property>
+ <name>selenium.browser</name>
+ <value>${selenium.browser}</value>
+ </property>
+ <property>
+ <name>selenium.browser.url</name>
+ <value>${selenium.browser.url}</value>
+ </property>
+ <property>
+ <name>selenium.speed</name>
+ <value>${selenium.speed}</value>
+ </property>
+ <property>
+ <name>selenium.timeout</name>
+ <value>${selenium.timeout}</value>
+ </property>
+ <property>
+ <name>basedir</name>
+ <value>${basedir}</value>
+ </property>
+ <property>
+ <name>jboss.config</name>
+ <value>${jboss.master.configuration}</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>integration-test</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>verify</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+
+ <!-- stop Selenium -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>${maven.antrun.plugin.version}</version>
+
+ <executions>
+ <!-- deploy application to farm directory and waiting for the application to be ready -->
+ <execution>
+ <id>farm-example</id>
+ <phase>pre-integration-test</phase>
+ <configuration>
+ <tasks>
+ <property name="url.to.wait" value="http://localhost:8180/${project.build.finalName}"/>
+ <copy file="${project.build.directory}/${project.build.finalName}.${project.packaging}" todir="${jboss.master.configuration}/farm"/>
+ <echo message="Waiting for application at ${url.to.wait}"/>
+ <waitfor maxwait="${application.deploy.timeout}" maxwaitunit="second">
+ <http url="${url.to.wait}" errorsBeginAt="404" />
+ </waitfor>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <!-- this ant script runs testng natively -->
+ <execution>
+ <id>stop-selenium</id>
+ <phase>post-integration-test</phase>
+ <configuration>
+ <tasks>
+ <echo message="Undeploying application..."/>
+ <delete file="${jboss.master.configuration}/farm/${project.build.finalName}.${project.packaging}"/>
+
+ <get taskname="selenium-shutdown"
+ src="http://${selenium.server.host}:${selenium.server.port}/selenium-server/driver/?cmd=shutDownSeleniumServer"
+ ignoreerrors="true"
+ dest="${project.build.directory}/selenium.stop.msg" />
+ <echo taskname="selenium-shutdown"
+ message="DGF Errors during shutdown are expected" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ </profile>
+
</profiles>
</project>
16 years, 2 months
Weld SVN: r5543 - cdi-tck/branches/1.0/doc/reference/en-US.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-01-20 18:24:43 -0500 (Wed, 20 Jan 2010)
New Revision: 5543
Modified:
cdi-tck/branches/1.0/doc/reference/en-US/configuration.xml
Log:
CDITCK-88
Modified: cdi-tck/branches/1.0/doc/reference/en-US/configuration.xml
===================================================================
--- cdi-tck/branches/1.0/doc/reference/en-US/configuration.xml 2010-01-20 23:21:00 UTC (rev 5542)
+++ cdi-tck/branches/1.0/doc/reference/en-US/configuration.xml 2010-01-20 23:24:43 UTC (rev 5543)
@@ -180,6 +180,20 @@
</method-selector>
</method-selectors>]]></programlisting>
</section>
+
+ <section>
+ <title>Using custom deployment descriptors</title>
+ <para>
+ In general, the CDI TCK uses the default deployment descriptors from the
+ JBoss Test Harness. However, sometimes the CDI TCK needs to override the
+ deployment descriptor, to hook in additional functionality, or to test a
+ specific deployment descriptor. You can find all overridden deployment
+ descriptors list in the <literal>dd-override-report.txt</literal> file
+ in the TCK bundle. Note that the CDI TCK assumes you won't need to
+ customize any CDI specified deployment descriptors, so these aren't
+ listed here.
+ </para>
+ </section>
<section>
<title>Configuring TestNG to execute the TCK</title>
16 years, 2 months
Weld SVN: r5542 - build/trunk/dist-tck.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-01-20 18:21:00 -0500 (Wed, 20 Jan 2010)
New Revision: 5542
Added:
build/trunk/dist-tck/generate-custom-dd-report.sh
Modified:
build/trunk/dist-tck/assembly.xml
Log:
add a report for overridden dds
Modified: build/trunk/dist-tck/assembly.xml
===================================================================
--- build/trunk/dist-tck/assembly.xml 2010-01-20 23:15:10 UTC (rev 5541)
+++ build/trunk/dist-tck/assembly.xml 2010-01-20 23:21:00 UTC (rev 5542)
@@ -18,6 +18,7 @@
<include>readme.txt</include>
<include>apl.txt</include>
<include>release-notes.txt</include>
+ <include>dd-override-report.txt</include>
</includes>
</fileSet>
</fileSets>
Added: build/trunk/dist-tck/generate-custom-dd-report.sh
===================================================================
--- build/trunk/dist-tck/generate-custom-dd-report.sh (rev 0)
+++ build/trunk/dist-tck/generate-custom-dd-report.sh 2010-01-20 23:21:00 UTC (rev 5542)
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+ANNOTATIONS="@PersistenceXml @WebXml @EjbJarXml"
+
+report=`pwd`/dd-override-report.txt
+echo "Deployment Descripters overriden by the TCK\n\n" > dd-override-report.txt
+
+if [[ -z $TCK_HOME ]]
+then
+ echo "ERROR: You must set the environment variable TCK_HOME to point at the TCK to report on"
+ exit
+fi
+
+echo "Using TCK in $TCK_HOME"
+
+cd $TCK_HOME/impl/src/main/java
+for annotation in $ANNOTATIONS
+do
+ echo "$annotation\n" >> $report
+ echo "------------\n" >> $report
+ grep -r "$annotation" --include "*.java" * | sed 's/[A-z]*\.java:@[A-z]*("//g' | sed 's/")//g' | sed 's/
+//g' >> $report
+ echo "\n" >> $report
+done
Property changes on: build/trunk/dist-tck/generate-custom-dd-report.sh
___________________________________________________________________
Name: svn:executable
+ *
16 years, 2 months
Weld SVN: r5541 - cdi-tck/branches/1.0.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-01-20 18:15:10 -0500 (Wed, 20 Jan 2010)
New Revision: 5541
Modified:
cdi-tck/branches/1.0/pom.xml
Log:
use snapshot of testharness
Modified: cdi-tck/branches/1.0/pom.xml
===================================================================
--- cdi-tck/branches/1.0/pom.xml 2010-01-20 23:14:31 UTC (rev 5540)
+++ cdi-tck/branches/1.0/pom.xml 2010-01-20 23:15:10 UTC (rev 5541)
@@ -75,7 +75,7 @@
<properties>
<jboss.test.audit.version>1.1.0-SNAPSHOT</jboss.test.audit.version>
- <jboss.test.harness.version>1.1.0-CR3</jboss.test.harness.version>
+ <jboss.test.harness.version>1.1.0-SNAPSHOT</jboss.test.harness.version>
<testng.version>5.10</testng.version>
<jsr250.api.version>1.0</jsr250.api.version>
<cdi.api.version>1.0</cdi.api.version>
16 years, 2 months
Weld SVN: r5540 - in cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests: context/conversation/client and 9 other directories.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-01-20 18:14:31 -0500 (Wed, 20 Jan 2010)
New Revision: 5540
Modified:
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ApplicationContextTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ClientConversationContextTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/InvalidatingSessionDestroysConversationTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/LongRunningConversationPropagatedByFacesContextTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ManualCidPropagationTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/RequestContextTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/session/SessionContextTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/EnvInjectionTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/incontainer/ClientProxyTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/InjectionIntoWebServiceEndPointTest.java
cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/broken/not/bean/InjectionPointTest.java
Log:
Use specific overrides
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ApplicationContextTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ApplicationContextTest.java 2010-01-20 22:20:09 UTC (rev 5539)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ApplicationContextTest.java 2010-01-20 23:14:31 UTC (rev 5540)
@@ -1,105 +1,105 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.jsr299.tck.tests.context.application;
-
-import org.jboss.jsr299.tck.AbstractJSR299Test;
-import org.jboss.test.audit.annotations.SpecAssertion;
-import org.jboss.test.audit.annotations.SpecVersion;
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.testharness.impl.packaging.Resource;
-import org.jboss.testharness.impl.packaging.Resources;
-import org.jboss.testharness.impl.packaging.war.WarArtifactDescriptor;
-import org.testng.annotations.Test;
-
-import com.gargoylesoftware.htmlunit.TextPage;
-import com.gargoylesoftware.htmlunit.WebClient;
-
-/**
- * @author David Allen
- * @author Jozef Hartinger
- */
-@Artifact
-@IntegrationTest(runLocally=true)
-@Resources({
- @Resource(destination=WarArtifactDescriptor.WEB_XML_DESTINATION, source="web.xml"),
- @Resource(destination="SimplePage.html", source="SimplePage.html")
-})
-@SpecVersion(spec="cdi", version="20091101")
-public class ApplicationContextTest extends AbstractJSR299Test
-{
-
- @Test(groups = { "contexts", "servlet", "integration" })
- @SpecAssertion(section = "6.7.3", id = "aa")
- public void testApplicationScopeActiveDuringServiceMethod() throws Exception
- {
- WebClient webClient = new WebClient();
- webClient.setThrowExceptionOnFailingStatusCode(true);
- webClient.getPage(getContextPath() + "TestServlet?test=servlet");
- }
-
- @Test(groups = { "contexts", "servlet", "integration" })
- @SpecAssertion(section = "6.7.3", id = "ab")
- public void testApplicationScopeActiveDuringDoFilterMethod() throws Exception
- {
- WebClient webClient = new WebClient();
- webClient.setThrowExceptionOnFailingStatusCode(true);
- webClient.getPage(getContextPath() + "SimplePage.html");
- }
-
-
- @Test(groups = { "contexts", "integration" })
- @SpecAssertion(section = "6.7.3", id = "ac")
- public void testApplicationScopeActiveDuringServletContextListenerInvocation() throws Exception {
- WebClient webClient = new WebClient();
- webClient.setThrowExceptionOnFailingStatusCode(true);
- webClient.getPage(getContextPath() + "TestServlet?test=servletContextListener");
- }
-
- @Test(groups = { "contexts", "integration" })
- @SpecAssertion(section = "6.7.3", id = "ad")
- public void testApplicationScopeActiveDuringHttpSessionListenerInvocation() throws Exception {
- WebClient webClient = new WebClient();
- webClient.setThrowExceptionOnFailingStatusCode(true);
- webClient.getPage(getContextPath() + "TestServlet?test=httpSessionListener");
- }
-
- @Test(groups = { "contexts", "integration" })
- @SpecAssertion(section = "6.7.3", id = "af")
- public void testApplicationScopeActiveDuringServletRequestListenerInvocation() throws Exception {
- WebClient webClient = new WebClient();
- webClient.setThrowExceptionOnFailingStatusCode(true);
- webClient.getPage(getContextPath() + "TestServlet?test=servletRequestListener");
- }
-
- @Test(groups = { "contexts", "integration" })
- @SpecAssertion(section = "6.7.3", id = "e")
- public void testApplicationContextSharedBetweenServletRequests() throws Exception
- {
- WebClient webClient = new WebClient();
- webClient.setThrowExceptionOnFailingStatusCode(true);
- TextPage firstRequestResult = webClient.getPage(getContextPath() + "IntrospectApplication");
- assert firstRequestResult.getContent() != null;
- assert Double.parseDouble(firstRequestResult.getContent()) != 0;
- // Make a second request and make sure the same context is used
- TextPage secondRequestResult = webClient.getPage(getContextPath() + "IntrospectApplication");
- assert secondRequestResult.getContent() != null;
- // should be same random number
- assert Double.parseDouble(secondRequestResult.getContent()) == Double.parseDouble(firstRequestResult.getContent());
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.context.application;
+
+import org.jboss.jsr299.tck.AbstractJSR299Test;
+import org.jboss.test.audit.annotations.SpecAssertion;
+import org.jboss.test.audit.annotations.SpecVersion;
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.testharness.impl.packaging.IntegrationTest;
+import org.jboss.testharness.impl.packaging.Resource;
+import org.jboss.testharness.impl.packaging.Resources;
+import org.jboss.testharness.impl.packaging.war.WebXml;
+import org.testng.annotations.Test;
+
+import com.gargoylesoftware.htmlunit.TextPage;
+import com.gargoylesoftware.htmlunit.WebClient;
+
+/**
+ * @author David Allen
+ * @author Jozef Hartinger
+ */
+@Artifact
+@IntegrationTest(runLocally=true)
+@Resources({
+ @Resource(destination="SimplePage.html", source="SimplePage.html")
+})
+@WebXml("web.xml")
+@SpecVersion(spec="cdi", version="20091101")
+public class ApplicationContextTest extends AbstractJSR299Test
+{
+
+ @Test(groups = { "contexts", "servlet", "integration" })
+ @SpecAssertion(section = "6.7.3", id = "aa")
+ public void testApplicationScopeActiveDuringServiceMethod() throws Exception
+ {
+ WebClient webClient = new WebClient();
+ webClient.setThrowExceptionOnFailingStatusCode(true);
+ webClient.getPage(getContextPath() + "TestServlet?test=servlet");
+ }
+
+ @Test(groups = { "contexts", "servlet", "integration" })
+ @SpecAssertion(section = "6.7.3", id = "ab")
+ public void testApplicationScopeActiveDuringDoFilterMethod() throws Exception
+ {
+ WebClient webClient = new WebClient();
+ webClient.setThrowExceptionOnFailingStatusCode(true);
+ webClient.getPage(getContextPath() + "SimplePage.html");
+ }
+
+
+ @Test(groups = { "contexts", "integration" })
+ @SpecAssertion(section = "6.7.3", id = "ac")
+ public void testApplicationScopeActiveDuringServletContextListenerInvocation() throws Exception {
+ WebClient webClient = new WebClient();
+ webClient.setThrowExceptionOnFailingStatusCode(true);
+ webClient.getPage(getContextPath() + "TestServlet?test=servletContextListener");
+ }
+
+ @Test(groups = { "contexts", "integration" })
+ @SpecAssertion(section = "6.7.3", id = "ad")
+ public void testApplicationScopeActiveDuringHttpSessionListenerInvocation() throws Exception {
+ WebClient webClient = new WebClient();
+ webClient.setThrowExceptionOnFailingStatusCode(true);
+ webClient.getPage(getContextPath() + "TestServlet?test=httpSessionListener");
+ }
+
+ @Test(groups = { "contexts", "integration" })
+ @SpecAssertion(section = "6.7.3", id = "af")
+ public void testApplicationScopeActiveDuringServletRequestListenerInvocation() throws Exception {
+ WebClient webClient = new WebClient();
+ webClient.setThrowExceptionOnFailingStatusCode(true);
+ webClient.getPage(getContextPath() + "TestServlet?test=servletRequestListener");
+ }
+
+ @Test(groups = { "contexts", "integration" })
+ @SpecAssertion(section = "6.7.3", id = "e")
+ public void testApplicationContextSharedBetweenServletRequests() throws Exception
+ {
+ WebClient webClient = new WebClient();
+ webClient.setThrowExceptionOnFailingStatusCode(true);
+ TextPage firstRequestResult = webClient.getPage(getContextPath() + "IntrospectApplication");
+ assert firstRequestResult.getContent() != null;
+ assert Double.parseDouble(firstRequestResult.getContent()) != 0;
+ // Make a second request and make sure the same context is used
+ TextPage secondRequestResult = webClient.getPage(getContextPath() + "IntrospectApplication");
+ assert secondRequestResult.getContent() != null;
+ // should be same random number
+ assert Double.parseDouble(secondRequestResult.getContent()) == Double.parseDouble(firstRequestResult.getContent());
+ }
+
+}
Property changes on: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/application/ApplicationContextTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ClientConversationContextTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ClientConversationContextTest.java 2010-01-20 22:20:09 UTC (rev 5539)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ClientConversationContextTest.java 2010-01-20 23:14:31 UTC (rev 5540)
@@ -8,7 +8,7 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Resource;
import org.jboss.testharness.impl.packaging.Resources;
-import org.jboss.testharness.impl.packaging.war.WarArtifactDescriptor;
+import org.jboss.testharness.impl.packaging.war.WebXml;
import org.testng.annotations.Test;
import com.gargoylesoftware.htmlunit.Page;
@@ -25,7 +25,6 @@
@Classes({Storm.class, ConversationTestPhaseListener.class, ConversationStatusServlet.class, Cloud.class, CloudController.class})
@IntegrationTest(runLocally=true)
@Resources({
- @Resource(destination=WarArtifactDescriptor.WEB_XML_DESTINATION, source="web.xml"),
@Resource(destination="home.jspx", source="home.jsf"),
@Resource(destination="cloud.jspx", source="cloud.jsf"),
@Resource(destination="clouds.jspx", source="clouds.jsf"),
@@ -33,6 +32,7 @@
@Resource(destination="/WEB-INF/faces-config.xml", source="faces-config.xml"),
@Resource(destination="rain.jspx", source="rain.jsf")
})
+@WebXml("web.xml")
@SpecVersion(spec="cdi", version="20091101")
public class ClientConversationContextTest extends AbstractConversationTest
{
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/InvalidatingSessionDestroysConversationTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/InvalidatingSessionDestroysConversationTest.java 2010-01-20 22:20:09 UTC (rev 5539)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/InvalidatingSessionDestroysConversationTest.java 2010-01-20 23:14:31 UTC (rev 5540)
@@ -7,7 +7,7 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Resource;
import org.jboss.testharness.impl.packaging.Resources;
-import org.jboss.testharness.impl.packaging.war.WarArtifactDescriptor;
+import org.jboss.testharness.impl.packaging.war.WebXml;
import org.testng.annotations.Test;
import com.gargoylesoftware.htmlunit.WebClient;
@@ -19,11 +19,11 @@
@Classes({Storm.class, ConversationTestPhaseListener.class, ConversationStatusServlet.class, Cloud.class, CloudController.class})
@IntegrationTest(runLocally=true)
@Resources({
- @Resource(destination=WarArtifactDescriptor.WEB_XML_DESTINATION, source="web.xml"),
@Resource(destination="WEB-INF/faces-config.xml", source="faces-config.xml"),
@Resource(destination="clouds.jspx", source="clouds.jsf"),
@Resource(destination="cloud.jspx", source="cloud.jsf")
})
+@WebXml("web.xml")
@SpecVersion(spec="cdi", version="20091101")
public class InvalidatingSessionDestroysConversationTest extends AbstractConversationTest
{
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/LongRunningConversationPropagatedByFacesContextTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/LongRunningConversationPropagatedByFacesContextTest.java 2010-01-20 22:20:09 UTC (rev 5539)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/LongRunningConversationPropagatedByFacesContextTest.java 2010-01-20 23:14:31 UTC (rev 5540)
@@ -8,7 +8,7 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Resource;
import org.jboss.testharness.impl.packaging.Resources;
-import org.jboss.testharness.impl.packaging.war.WarArtifactDescriptor;
+import org.jboss.testharness.impl.packaging.war.WebXml;
import org.testng.annotations.Test;
import com.gargoylesoftware.htmlunit.WebClient;
@@ -23,12 +23,12 @@
@Classes({Storm.class, ConversationTestPhaseListener.class, ConversationStatusServlet.class, Cloud.class})
@IntegrationTest(runLocally=true)
@Resources({
- @Resource(destination=WarArtifactDescriptor.WEB_XML_DESTINATION, source="web.xml"),
@Resource(destination="WEB-INF/faces-config.xml", source="faces-config.xml"),
@Resource(destination="storm.jspx", source="storm.jsf"),
@Resource(destination="thunder.jspx", source="thunder.jsf"),
@Resource(destination="lightening.jspx", source="lightening.jsf")
})
+@WebXml("web.xml")
@SpecVersion(spec="cdi", version="20091101")
public class LongRunningConversationPropagatedByFacesContextTest extends AbstractConversationTest
{
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ManualCidPropagationTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ManualCidPropagationTest.java 2010-01-20 22:20:09 UTC (rev 5539)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/conversation/client/ManualCidPropagationTest.java 2010-01-20 23:14:31 UTC (rev 5540)
@@ -7,7 +7,7 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Resource;
import org.jboss.testharness.impl.packaging.Resources;
-import org.jboss.testharness.impl.packaging.war.WarArtifactDescriptor;
+import org.jboss.testharness.impl.packaging.war.WebXml;
import org.testng.annotations.Test;
import com.gargoylesoftware.htmlunit.WebClient;
@@ -23,12 +23,12 @@
@Classes({Storm.class, ConversationTestPhaseListener.class, ConversationStatusServlet.class, Cloud.class, CloudController.class})
@IntegrationTest(runLocally=true)
@Resources({
- @Resource(destination=WarArtifactDescriptor.WEB_XML_DESTINATION, source="web.xml"),
@Resource(destination="cloud.jspx", source="cloud.jsf"),
@Resource(destination="storm.jspx", source="storm.jsf"),
@Resource(destination="clouds.jspx", source="clouds.jsf"),
@Resource(destination="/WEB-INF/faces-config.xml", source="faces-config.xml")
})
+@WebXml("web.xml")
@SpecVersion(spec="cdi", version="20091101")
public class ManualCidPropagationTest extends AbstractConversationTest
{
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/RequestContextTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/RequestContextTest.java 2010-01-20 22:20:09 UTC (rev 5539)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/request/RequestContextTest.java 2010-01-20 23:14:31 UTC (rev 5540)
@@ -7,7 +7,7 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Resource;
import org.jboss.testharness.impl.packaging.Resources;
-import org.jboss.testharness.impl.packaging.war.WarArtifactDescriptor;
+import org.jboss.testharness.impl.packaging.war.WebXml;
import org.testng.annotations.Test;
import com.gargoylesoftware.htmlunit.TextPage;
@@ -16,9 +16,9 @@
@Artifact
@IntegrationTest(runLocally=true)
@Resources({
- @Resource(destination=WarArtifactDescriptor.WEB_XML_DESTINATION, source="web.xml"),
@Resource(destination="SimplePage.html", source="SimplePage.html")
})
+@WebXml("web.xml")
@SpecVersion(spec="cdi", version="20091101")
public class RequestContextTest extends AbstractJSR299Test
{
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/session/SessionContextTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/session/SessionContextTest.java 2010-01-20 22:20:09 UTC (rev 5539)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/context/session/SessionContextTest.java 2010-01-20 23:14:31 UTC (rev 5540)
@@ -7,7 +7,7 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Resource;
import org.jboss.testharness.impl.packaging.Resources;
-import org.jboss.testharness.impl.packaging.war.WarArtifactDescriptor;
+import org.jboss.testharness.impl.packaging.war.WebXml;
import org.testng.annotations.Test;
import com.gargoylesoftware.htmlunit.TextPage;
@@ -16,9 +16,9 @@
@Artifact
@IntegrationTest(runLocally=true)
@Resources({
- @Resource(destination=WarArtifactDescriptor.WEB_XML_DESTINATION, source="web.xml"),
@Resource(destination="SimplePage.html", source="SimplePage.html")
})
+@WebXml("web.xml")
@SpecVersion(spec="cdi", version="20091101")
public class SessionContextTest extends AbstractJSR299Test
{
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/EnvInjectionTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/EnvInjectionTest.java 2010-01-20 22:20:09 UTC (rev 5539)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/env/EnvInjectionTest.java 2010-01-20 23:14:31 UTC (rev 5540)
@@ -28,8 +28,8 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Packaging;
import org.jboss.testharness.impl.packaging.PackagingType;
-import org.jboss.testharness.impl.packaging.Resource;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
+import org.jboss.testharness.impl.packaging.war.WebXml;
import org.testng.annotations.Test;
/**
@@ -40,9 +40,9 @@
@Artifact
@Packaging(PackagingType.WAR)
@IntegrationTest
-@Resource(source="web.xml", destination="/WEB-INF/web.xml")
@BeansXml("beans.xml")
@SpecVersion(spec="cdi", version="20091101")
+@WebXml("web.xml")
public class EnvInjectionTest extends AbstractJSR299Test
{
@Test(groups = { "beanLifecycle", "commonAnnotations", "integration" })
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java 2010-01-20 22:20:09 UTC (rev 5539)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java 2010-01-20 23:14:31 UTC (rev 5540)
@@ -14,7 +14,7 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Packaging;
import org.jboss.testharness.impl.packaging.PackagingType;
-import org.jboss.testharness.impl.packaging.Resource;
+import org.jboss.testharness.impl.packaging.ear.PersistenceXml;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
@@ -26,8 +26,7 @@
@Artifact
@Packaging(PackagingType.WAR)
@IntegrationTest
-@Resource(source = "persistence.xml", destination = "WEB-INF/classes/META-INF/persistence.xml")
-//@PersistenceXml("persistence.xml")
+@PersistenceXml("persistence.xml")
@BeansXml("beans.xml")
@SpecVersion(spec="cdi", version="20091101")
public class PersistenceContextInjectionTest extends AbstractJSR299Test
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/incontainer/ClientProxyTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/incontainer/ClientProxyTest.java 2010-01-20 22:20:09 UTC (rev 5539)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/clientProxy/incontainer/ClientProxyTest.java 2010-01-20 23:14:31 UTC (rev 5540)
@@ -21,16 +21,15 @@
import org.jboss.test.audit.annotations.SpecVersion;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.testharness.impl.packaging.Resource;
-import org.jboss.testharness.impl.packaging.war.WarArtifactDescriptor;
+import org.jboss.testharness.impl.packaging.war.WebXml;
import org.testng.annotations.Test;
import com.gargoylesoftware.htmlunit.WebClient;
@Artifact
@IntegrationTest(runLocally = true)
-@Resource(destination = WarArtifactDescriptor.WEB_XML_DESTINATION, source = "web.xml")
@SpecVersion(spec="cdi", version="20091101")
+@WebXml("web.xml")
public class ClientProxyTest extends AbstractJSR299Test
{
@Test
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java 2010-01-20 22:20:09 UTC (rev 5539)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java 2010-01-20 23:14:31 UTC (rev 5540)
@@ -23,7 +23,7 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Resource;
import org.jboss.testharness.impl.packaging.Resources;
-import org.jboss.testharness.impl.packaging.war.WarArtifactDescriptor;
+import org.jboss.testharness.impl.packaging.war.WebXml;
import org.testng.annotations.Test;
import com.gargoylesoftware.htmlunit.WebClient;
@@ -31,11 +31,11 @@
@Artifact
@IntegrationTest(runLocally = true)
@Resources( {
- @Resource(destination = WarArtifactDescriptor.WEB_XML_DESTINATION, source = "web.xml"),
@Resource(destination = "WEB-INF/faces-config.xml", source = "faces-config.xml"),
@Resource(destination = "JSFTestPage.jsp", source = "JSFTestPage.jsp"),
@Resource(destination = "JSPTestPage.jsp", source = "JSPTestPage.jsp")})
@SpecVersion(spec="cdi", version="20091101")
+@WebXml("web.xml")
public class IntegrationWithUnifiedELTest extends AbstractJSR299Test
{
@Test(groups = {"el" } )
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java 2010-01-20 22:20:09 UTC (rev 5539)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java 2010-01-20 23:14:31 UTC (rev 5540)
@@ -41,7 +41,7 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Resource;
import org.jboss.testharness.impl.packaging.Resources;
-import org.jboss.testharness.impl.packaging.war.WarArtifactDescriptor;
+import org.jboss.testharness.impl.packaging.war.WebXml;
import org.testng.annotations.Test;
/**
@@ -52,13 +52,13 @@
*/
@Artifact
@Resources( {
- @Resource(destination = WarArtifactDescriptor.WEB_XML_DESTINATION, source = "web.xml"),
@Resource(destination = "WEB-INF/faces-config.xml", source = "faces-config.xml"),
@Resource(destination = "WEB-INF/TestLibrary.tld", source = "TestLibrary.tld"),
@Resource(destination = "TagPage.jsp", source = "TagPage.jsp"),
@Resource(destination = "ManagedBeanTestPage.jsp", source = "ManagedBeanTestPage.jsp"),
@Resource(source = "javax.enterprise.inject.spi.Extension", destination = "WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension") })
@IntegrationTest
+@WebXml("web.xml")
@SpecVersion(spec = "cdi", version = "20091101")
public class ContainerEventTest extends AbstractJSR299Test
{
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java 2010-01-20 22:20:09 UTC (rev 5539)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java 2010-01-20 23:14:31 UTC (rev 5540)
@@ -24,7 +24,7 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Resource;
import org.jboss.testharness.impl.packaging.Resources;
-import org.jboss.testharness.impl.packaging.war.WarArtifactDescriptor;
+import org.jboss.testharness.impl.packaging.war.WebXml;
import org.testng.annotations.Test;
import com.gargoylesoftware.htmlunit.WebClient;
@@ -33,12 +33,12 @@
@Artifact
@IntegrationTest(runLocally = true)
@Resources( {
- @Resource(destination = WarArtifactDescriptor.WEB_XML_DESTINATION, source = "web.xml"),
@Resource(destination = "WEB-INF/faces-config.xml", source = "faces-config.xml"),
@Resource(destination = "WEB-INF/TestLibrary.tld", source = "TestLibrary.tld"),
@Resource(destination = "TagPage.jsp", source = "TagPage.jsp"),
@Resource(destination = "ManagedBeanTestPage.jsp", source = "ManagedBeanTestPage.jsp")})
@SpecVersion(spec="cdi", version="20091101")
+@WebXml("web.xml")
public class InjectionIntoNonContextualComponentTest extends AbstractJSR299Test
{
@Test
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/InjectionIntoWebServiceEndPointTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/InjectionIntoWebServiceEndPointTest.java 2010-01-20 22:20:09 UTC (rev 5539)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injection/non/contextual/ws/InjectionIntoWebServiceEndPointTest.java 2010-01-20 23:14:31 UTC (rev 5540)
@@ -24,14 +24,13 @@
import org.jboss.test.audit.annotations.SpecVersion;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.testharness.impl.packaging.Resource;
-import org.jboss.testharness.impl.packaging.war.WarArtifactDescriptor;
+import org.jboss.testharness.impl.packaging.war.WebXml;
import org.testng.annotations.Test;
@Artifact
@IntegrationTest(runLocally = true)
-@Resource(destination = WarArtifactDescriptor.WEB_XML_DESTINATION, source = "web.xml")
@SpecVersion(spec="cdi", version="20091101")
+@WebXml("web.xml")
public class InjectionIntoWebServiceEndPointTest extends AbstractJSR299Test
{
@WebServiceRef(wsdlLocation = "http://localhost:8080/org.jboss.jsr299.tck.tests.lookup.injection.non.con...")
Modified: cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/broken/not/bean/InjectionPointTest.java
===================================================================
--- cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/broken/not/bean/InjectionPointTest.java 2010-01-20 22:20:09 UTC (rev 5539)
+++ cdi-tck/branches/1.0/impl/src/main/java/org/jboss/jsr299/tck/tests/lookup/injectionpoint/broken/not/bean/InjectionPointTest.java 2010-01-20 23:14:31 UTC (rev 5540)
@@ -23,15 +23,14 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.ExpectedDeploymentException;
import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.testharness.impl.packaging.Resource;
-import org.jboss.testharness.impl.packaging.war.WarArtifactDescriptor;
+import org.jboss.testharness.impl.packaging.war.WebXml;
import org.testng.annotations.Test;
@Artifact
@SpecVersion(spec = "cdi", version = "20091101")
@ExpectedDeploymentException(DeploymentFailure.class)
@IntegrationTest
-@Resource(destination = WarArtifactDescriptor.WEB_XML_DESTINATION, source = "web.xml")
+@WebXml("web.xml")
public class InjectionPointTest extends AbstractJSR299Test
{
@Test
16 years, 2 months