Skip to content

Commit

Permalink
Merge pull request #38 from arquillian/master
Browse files Browse the repository at this point in the history
Update from origin
  • Loading branch information
kifj committed Dec 22, 2023
2 parents 9e5c621 + dec16d2 commit 5217897
Show file tree
Hide file tree
Showing 188 changed files with 298 additions and 10,105 deletions.
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Expand Up @@ -3,7 +3,7 @@
<extension>
<groupId>io.takari.maven</groupId>
<artifactId>takari-smart-builder</artifactId>
<version>0.6.2</version>
<version>0.6.4</version>
</extension>
<extension>
<groupId>io.takari.aether</groupId>
Expand Down
4 changes: 2 additions & 2 deletions bom/pom.xml
Expand Up @@ -7,7 +7,7 @@
<!-- Artifact Information -->
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Arquillian BOM</name>
<url>http://arquillian.org</url>
Expand Down Expand Up @@ -45,7 +45,7 @@

<version.shrinkwrap_core>1.2.6</version.shrinkwrap_core>
<version.shrinkwrap_descriptors>2.0.0</version.shrinkwrap_descriptors>
<version.shrinkwrap_resolver>3.1.4</version.shrinkwrap_resolver>
<version.shrinkwrap_resolver>3.2.1</version.shrinkwrap_resolver>

<jboss.releases.repo.id>jboss-releases-repository</jboss.releases.repo.id>
<jboss.releases.repo.url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/
Expand Down
11 changes: 8 additions & 3 deletions build/pom.xml
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-parent</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -25,8 +25,8 @@
<!-- Arquillian Core common Deps, Test related -->
<version.javax.inject>1</version.javax.inject>
<version.junit>4.13.2</version.junit>
<version.junit5.platform>1.9.3</version.junit5.platform>
<version.junit5>5.9.3</version.junit5>
<version.junit5.platform>1.10.1</version.junit5.platform>
<version.junit5>5.10.1</version.junit5>
<version.mockito>4.10.0</version.mockito>
<version.testng>7.5</version.testng>
<version.assertj>3.24.2</version.assertj>
Expand Down Expand Up @@ -67,6 +67,11 @@
<artifactId>junit-jupiter-api</artifactId>
<version>${version.junit5}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${version.junit5}</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-engine</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion config/api/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-build</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion config/impl-base/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-build</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>

Expand Down
Expand Up @@ -506,7 +506,7 @@ private ArquillianDescriptor create() {
private ArquillianDescriptor create(String xml) throws Exception {
validateXML(desc);

return Descriptors.importAs(ArquillianDescriptor.class).from(xml);
return Descriptors.importAs(ArquillianDescriptor.class).fromString(xml);
}

private void validateXML(String xml) throws Exception {
Expand Down
Expand Up @@ -532,7 +532,7 @@ private ArquillianDescriptor create() {
private ArquillianDescriptor create(String xml) throws Exception {
validateXML(desc.exportAsString());

return Descriptors.importAs(ArquillianDescriptor.class).from(xml);
return Descriptors.importAs(ArquillianDescriptor.class).fromString(xml);
}

private void validateXML(String xml) throws Exception {
Expand Down
2 changes: 1 addition & 1 deletion config/pom.xml
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-parent</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
</parent>

<!-- Model Information -->
Expand Down
2 changes: 1 addition & 1 deletion config/spi/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-build</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion container/impl-base/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-build</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>

Expand Down
Expand Up @@ -18,7 +18,7 @@
package org.jboss.arquillian.container.impl;

import java.util.HashMap;
import junit.framework.Assert;
import org.junit.Assert;
import org.jboss.arquillian.config.descriptor.api.Multiline;
import org.junit.Test;

Expand Down
Expand Up @@ -18,7 +18,7 @@
package org.jboss.arquillian.container.impl.client.container;

import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.jboss.arquillian.config.descriptor.api.ContainerDef;
import org.jboss.arquillian.container.impl.LocalContainerRegistry;
import org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler;
Expand Down
2 changes: 1 addition & 1 deletion container/pom.xml
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-parent</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
</parent>

<!-- Model Information -->
Expand Down
2 changes: 1 addition & 1 deletion container/spi/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-build</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion container/test-api/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-build</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion container/test-impl-base/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-build</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>

Expand Down
Expand Up @@ -21,6 +21,7 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
Expand Down Expand Up @@ -185,7 +186,10 @@ private <T> Set<Class<? extends T>> load(Class<T> serviceClass, ClassLoader load
Enumeration<URL> enumeration = loader.getResources(serviceFile);
while (enumeration.hasMoreElements()) {
final URL url = enumeration.nextElement();
final InputStream is = url.openStream();
URLConnection jarConnection = url.openConnection();
//Don't cache the file (avoids file leaks on GlassFish).
jarConnection.setUseCaches(false);
final InputStream is = jarConnection.getInputStream();
BufferedReader reader = null;

try {
Expand Down Expand Up @@ -222,6 +226,9 @@ private <T> Set<Class<? extends T>> load(Class<T> serviceClass, ClassLoader load
} catch (IOException exc) {
throw new RuntimeException("Could not read file: " + url);
} finally {
if (is != null) {
is.close();
}
if (reader != null) {
reader.close();
}
Expand Down
Expand Up @@ -52,16 +52,14 @@ public class LocalTestExecuter {
private InstanceProducer<TestResult> testResult;

public void execute(@Observes LocalExecutionEvent event) throws Exception {
TestResult result = new TestResult();
TestResult result = TestResult.passed();
try {
event.getExecutor().invoke(
enrichArguments(
event.getExecutor().getMethod(),
serviceLoader.get().all(TestEnricher.class)));
result.setStatus(Status.PASSED);
} catch (Throwable e) {
result.setStatus(Status.FAILED);
result.setThrowable(e);
result = TestResult.failed(e);
} finally {
result.setEnd(System.currentTimeMillis());
}
Expand Down
Expand Up @@ -18,7 +18,7 @@
package org.jboss.arquillian.container.test.impl.client.container;

import java.util.List;
import junit.framework.Assert;

import org.jboss.arquillian.config.descriptor.api.ContainerDef;
import org.jboss.arquillian.container.impl.LocalContainerRegistry;
import org.jboss.arquillian.container.spi.Container;
Expand All @@ -44,6 +44,7 @@
import org.jboss.arquillian.core.spi.ServiceLoader;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down
2 changes: 1 addition & 1 deletion container/test-spi/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-build</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/api/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-build</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/impl-base/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-build</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-parent</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
</parent>

<!-- Model Information -->
Expand Down
2 changes: 1 addition & 1 deletion core/spi/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-build</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion junit/container/pom.xml
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-build</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>

Expand Down
Expand Up @@ -22,7 +22,7 @@
import org.jboss.arquillian.junit.State;
import org.jboss.arquillian.test.spi.TestResult;
import org.junit.Test;
import org.junit.internal.AssumptionViolatedException;
import org.junit.AssumptionViolatedException;
import org.junit.runner.Description;
import org.junit.runner.JUnitCore;
import org.junit.runner.Request;
Expand Down
Expand Up @@ -24,7 +24,7 @@
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.internal.AssumptionViolatedException;
import org.junit.AssumptionViolatedException;
import org.junit.rules.ExpectedException;

public class JUnitTestRunnerTestCase {
Expand Down Expand Up @@ -145,6 +145,7 @@ public static class TestScenarios {

public static Exception exceptionThrownInAfter;

@SuppressWarnings("deprecation")
@Rule
public ExpectedException e = ExpectedException.none();

Expand Down
2 changes: 1 addition & 1 deletion junit/core/pom.xml
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-build</artifactId>
<version>1.7.2.Final-SNAPSHOT</version>
<version>1.8.1.Final-SNAPSHOT</version>
<relativePath>../../build/pom.xml</relativePath>
</parent>

Expand Down
Expand Up @@ -22,27 +22,21 @@
import java.util.Collections;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

import org.jboss.arquillian.junit.event.AfterRules;
import org.jboss.arquillian.junit.event.BeforeRules;
import org.jboss.arquillian.junit.event.RulesEnrichment;
import org.jboss.arquillian.test.spi.LifecycleMethodExecutor;
import org.jboss.arquillian.test.spi.TestMethodExecutor;
import org.jboss.arquillian.test.spi.TestResult;
import org.jboss.arquillian.test.spi.TestResult.Status;
import org.jboss.arquillian.test.spi.TestRunnerAdaptor;
import org.jboss.arquillian.test.spi.execution.SkippedTestExecutionException;
import org.junit.internal.AssumptionViolatedException;
import org.junit.internal.runners.model.MultipleFailureException;
import org.junit.internal.runners.model.ReflectiveCallable;
import org.junit.internal.runners.statements.Fail;
import org.junit.rules.TestRule;
import org.junit.runner.Description;
import org.junit.runner.Result;
import org.junit.runner.notification.RunListener;
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.InitializationError;
import org.junit.runners.model.MultipleFailureException;
import org.junit.runners.model.Statement;

/**
Expand Down
Expand Up @@ -5,7 +5,7 @@
import org.jboss.arquillian.test.spi.TestResult;
import org.jboss.arquillian.test.spi.TestRunnerAdaptor;
import org.jboss.arquillian.test.spi.execution.SkippedTestExecutionException;
import org.junit.internal.AssumptionViolatedException;
import org.junit.AssumptionViolatedException;
import org.junit.runners.model.FrameworkMethod;

abstract class MethodInvoker {
Expand Down
Expand Up @@ -22,7 +22,7 @@
import org.jboss.arquillian.test.spi.TestResult;
import org.jboss.arquillian.test.spi.TestResult.Status;
import org.jboss.arquillian.test.spi.event.suite.AfterTestLifecycleEvent;
import org.junit.internal.AssumptionViolatedException;
import org.junit.AssumptionViolatedException;

/**
* Update the TestResult based on result After going through the JUnit chain.
Expand Down
Expand Up @@ -20,6 +20,7 @@ public class ClassWithArquillianClassAndMethodRuleWithExpectedExceptionRule {
@Rule
public ArquillianTest arquillianTest = new ArquillianTest();

@SuppressWarnings("deprecation")
@Rule
public ExpectedException e = ExpectedException.none();

Expand Down
Expand Up @@ -30,6 +30,7 @@

@RunWith(Arquillian.class)
public class ClassWithArquillianRunnerWithExpectedExceptionRule {
@SuppressWarnings("deprecation")
@Rule
public ExpectedException e = ExpectedException.none();

Expand Down

0 comments on commit 5217897

Please sign in to comment.