Issue #3804 - Disabling CDI tests until Weld can be fixed

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2019-06-21 18:28:54 -05:00
parent c7b6110267
commit 85f198419d
8 changed files with 3 additions and 98 deletions

View File

@ -1,5 +0,0 @@
[description]
Jetty setup to support Weld/CDI2 with WELD inside the webapp
[depend]
cdi2

View File

@ -1,45 +0,0 @@
//
// ========================================================================
// Copyright (c) 1995-2019 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//
package org.eclipse.jetty.cdi.core;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* Unit tests for class {@link NamedLiteral}.
*
* @see NamedLiteral
*/
public class NamedLiteralTest
{
@Test
public void testCreatesNamedLiteralWithNull()
{
assertEquals("", new NamedLiteral(null).value());
}
@Test
public void testGetValue()
{
assertEquals("a b", new NamedLiteral("a b").value());
}
}

View File

@ -1,19 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
<!-- =============================================================== -->
<!-- Mixin the Weld / CDI classes to the class loader -->
<!-- =============================================================== -->
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Ref refid="DeploymentManager">
<Call name="addLifeCycleBinding">
<Arg>
<New class="org.eclipse.jetty.deploy.bindings.GlobalWebappConfigBinding">
<Set name="jettyXml"><Property name="jetty.home" default="."/>/etc/cdi2/jetty-web-cdi2.xml</Set>
</New>
</Arg>
</Call>
</Ref>
</Configure>

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Get name="serverClasspathPattern">
<Call name="add">
<Arg>-org.eclipse.jetty.util.Decorator</Arg>
</Call>
<Call name="add">
<Arg>-org.eclipse.jetty.util.DecoratedObjectFactory</Arg>
</Call>
<Call name="add">
<Arg>-org.eclipse.jetty.server.handler.ContextHandler.</Arg>
</Call>
<Call name="add">
<Arg>-org.eclipse.jetty.server.handler.ContextHandler</Arg>
</Call>
<Call name="add">
<Arg>-org.eclipse.jetty.servlet.ServletContextHandler</Arg>
</Call>
</Get>
</Configure>

View File

@ -9,9 +9,6 @@ annotations
[lib]
lib/apache-jsp/org.mortbay.jasper.apache-el-*.jar
[xml]
etc/cdi2/jetty-cdi2.xml
[ini]
jetty.webapp.addServerClasses+=,-org.eclipse.jetty.util.Decorator,-org.eclipse.jetty.util.DecoratedObjectFactory
jetty.webapp.addServerClasses+=,-org.eclipse.jetty.server.handler.ContextHandler.,-org.eclipse.jetty.server.handler.ContextHandler,-org.eclipse.jetty.servlet.ServletContextHandler

View File

@ -23,9 +23,6 @@ package org.eclipse.jetty.util;
* <p>
* Most common use is weld/CDI.
* <p>
* This was moved from org.eclipse.jetty.servlet.ServletContextHandler to allow
* client applications to also use Weld/CDI to decorate objects.
* Such as websocket client (which has no servlet api requirement)
*/
public interface Decorator
{

View File

@ -23,6 +23,7 @@ import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.client.api.ContentResponse;
import org.eclipse.jetty.http.HttpStatus;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import static org.hamcrest.MatcherAssert.assertThat;
@ -30,6 +31,7 @@ import static org.hamcrest.Matchers.containsString;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
@Disabled("Until issue is fixed at weld -> https://github.com/eclipse/jetty.project/issues/3803")
public class CDITests extends AbstractDistributionTest
{
/**

View File

@ -4,7 +4,7 @@
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/demo</Set>
<Set name="war"><Property name="jetty.webapps"/>/demo/</Set>
<Get name="serverClasspathPattern">
<Get name="serverClassMatcher">
<Call name="add">
<Arg>-org.eclipse.jetty.util.Decorator</Arg>
</Call>