Fixing build.
+ Bumping jetty-test-helper to 2.0 + Bumping jetty-version-maven-plugin to 1.0.10 + Fixing JDK 1.5 build warts + Updating Stress use for new "test.stress" property introduced by upgrades
This commit is contained in:
parent
cc34bdc20a
commit
5084a1430f
|
@ -18,12 +18,8 @@
|
|||
|
||||
package org.eclipse.jetty.client;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.matchers.JUnitMatchers.containsString;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.matchers.JUnitMatchers.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -46,7 +42,7 @@ import org.eclipse.jetty.io.Connection;
|
|||
import org.eclipse.jetty.io.EofException;
|
||||
import org.eclipse.jetty.io.nio.DirectNIOBuffer;
|
||||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.toolchain.test.Stress;
|
||||
import org.eclipse.jetty.toolchain.test.PropertyFlag;
|
||||
import org.eclipse.jetty.util.component.AbstractLifeCycle;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
|
@ -115,7 +111,7 @@ public class HttpExchangeTest
|
|||
sender(10,false);
|
||||
sender(10,true);
|
||||
|
||||
if (Stress.isEnabled())
|
||||
if (PropertyFlag.isEnabled("test.stress"))
|
||||
{
|
||||
sender(100,false);
|
||||
sender(100,true);
|
||||
|
|
|
@ -24,15 +24,15 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import org.eclipse.jetty.toolchain.test.Stress;
|
||||
import org.eclipse.jetty.toolchain.test.PropertyFlag;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ThreadLocalBuffersTest
|
||||
{
|
||||
private Buffers httpBuffers;
|
||||
private List<Thread> threadList = new ArrayList<Thread>();
|
||||
private int numThreads = Stress.isEnabled()?100:10;
|
||||
private int runTestLength = Stress.isEnabled()?5000:1000;
|
||||
private int numThreads = PropertyFlag.isEnabled("test.stress")?100:10;
|
||||
private int runTestLength = PropertyFlag.isEnabled("test.stress")?5000:1000;
|
||||
private boolean runTest = false;
|
||||
private AtomicLong buffersRetrieved;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
package org.eclipse.jetty.server;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -36,7 +36,7 @@ import org.eclipse.jetty.continuation.Continuation;
|
|||
import org.eclipse.jetty.continuation.ContinuationListener;
|
||||
import org.eclipse.jetty.server.handler.HandlerWrapper;
|
||||
import org.eclipse.jetty.server.nio.SelectChannelConnector;
|
||||
import org.eclipse.jetty.toolchain.test.Stress;
|
||||
import org.eclipse.jetty.toolchain.test.PropertyFlag;
|
||||
import org.eclipse.jetty.util.IO;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
import org.eclipse.jetty.util.log.Logger;
|
||||
|
@ -90,7 +90,7 @@ public class AsyncStressTest
|
|||
@Test
|
||||
public void testAsync() throws Throwable
|
||||
{
|
||||
if (Stress.isEnabled())
|
||||
if (PropertyFlag.isEnabled("test.stress"))
|
||||
{
|
||||
doConnections(1600,240);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
import org.eclipse.jetty.server.handler.AbstractHandler;
|
||||
import org.eclipse.jetty.server.handler.HandlerWrapper;
|
||||
import org.eclipse.jetty.toolchain.test.Stress;
|
||||
import org.eclipse.jetty.toolchain.test.PropertyFlag;
|
||||
import org.eclipse.jetty.util.IO;
|
||||
import org.junit.AfterClass;
|
||||
|
||||
|
@ -44,7 +44,7 @@ import org.junit.AfterClass;
|
|||
public class HttpServerTestFixture
|
||||
{ // Useful constants
|
||||
protected static final long PAUSE=10L;
|
||||
protected static final int LOOPS=Stress.isEnabled()?250:50;
|
||||
protected static final int LOOPS=PropertyFlag.isEnabled("test.stress")?250:50;
|
||||
protected static final String HOST="localhost";
|
||||
|
||||
protected static Server _server;
|
||||
|
|
|
@ -36,7 +36,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import org.eclipse.jetty.server.handler.HandlerWrapper;
|
||||
import org.eclipse.jetty.server.nio.SelectChannelConnector;
|
||||
import org.eclipse.jetty.toolchain.test.OS;
|
||||
import org.eclipse.jetty.toolchain.test.Stress;
|
||||
import org.eclipse.jetty.toolchain.test.PropertyFlag;
|
||||
import org.eclipse.jetty.util.BlockingArrayQueue;
|
||||
import org.eclipse.jetty.util.IO;
|
||||
import org.eclipse.jetty.util.log.Log;
|
||||
|
@ -126,10 +126,10 @@ public class StressTest
|
|||
public void testNonPersistent() throws Throwable
|
||||
{
|
||||
// TODO needs to be further investigated
|
||||
assumeTrue(!OS.IS_OSX || Stress.isEnabled());
|
||||
assumeTrue(!OS.IS_OSX || PropertyFlag.isEnabled("test.stress"));
|
||||
|
||||
doThreads(10,10,false);
|
||||
if (Stress.isEnabled())
|
||||
if (PropertyFlag.isEnabled("test.stress"))
|
||||
{
|
||||
Thread.sleep(1000);
|
||||
doThreads(200,10,false);
|
||||
|
@ -142,10 +142,10 @@ public class StressTest
|
|||
public void testPersistent() throws Throwable
|
||||
{
|
||||
// TODO needs to be further investigated
|
||||
assumeTrue(!OS.IS_OSX || Stress.isEnabled());
|
||||
assumeTrue(!OS.IS_OSX || PropertyFlag.isEnabled("test.stress"));
|
||||
|
||||
doThreads(20,10,true);
|
||||
if (Stress.isEnabled())
|
||||
if (PropertyFlag.isEnabled("test.stress"))
|
||||
{
|
||||
Thread.sleep(1000);
|
||||
doThreads(200,10,true);
|
||||
|
|
|
@ -53,31 +53,26 @@ public class FileNoticeLifeCycleListener implements LifeCycle.Listener
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lifeCycleStarting(LifeCycle event)
|
||||
{
|
||||
writeState("STARTING",event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lifeCycleStarted(LifeCycle event)
|
||||
{
|
||||
writeState("STARTED",event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lifeCycleFailure(LifeCycle event, Throwable cause)
|
||||
{
|
||||
writeState("FAILED",event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lifeCycleStopping(LifeCycle event)
|
||||
{
|
||||
writeState("STOPPING",event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void lifeCycleStopped(LifeCycle event)
|
||||
{
|
||||
writeState("STOPPED",event);
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -237,7 +237,7 @@
|
|||
<plugin>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-version-maven-plugin</artifactId>
|
||||
<version>1.0.9</version>
|
||||
<version>1.0.10</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
@ -508,7 +508,7 @@
|
|||
<dependency>
|
||||
<groupId>org.eclipse.jetty.toolchain</groupId>
|
||||
<artifactId>jetty-test-helper</artifactId>
|
||||
<version>1.6.1</version>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
|
|
Loading…
Reference in New Issue