mirror of https://github.com/apache/jclouds.git
reduced iterations so the tests will run faster
git-svn-id: http://jclouds.googlecode.com/svn/trunk@2382 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
1f6b92fc9d
commit
fc5f675be5
|
@ -46,7 +46,7 @@ import com.google.common.collect.ImmutableMap;
|
||||||
@Test(threadPoolSize = 10)
|
@Test(threadPoolSize = 10)
|
||||||
public abstract class BaseHttpCommandExecutorServiceTest extends BaseJettyTest {
|
public abstract class BaseHttpCommandExecutorServiceTest extends BaseJettyTest {
|
||||||
|
|
||||||
@Test(invocationCount = 50, timeOut = 5000)
|
@Test(invocationCount = 25, timeOut = 5000)
|
||||||
public void testRequestFilter() throws MalformedURLException, ExecutionException,
|
public void testRequestFilter() throws MalformedURLException, ExecutionException,
|
||||||
InterruptedException, TimeoutException {
|
InterruptedException, TimeoutException {
|
||||||
assertEquals(client.downloadFilter("", "filterme").trim(), "test");
|
assertEquals(client.downloadFilter("", "filterme").trim(), "test");
|
||||||
|
@ -54,13 +54,13 @@ public abstract class BaseHttpCommandExecutorServiceTest extends BaseJettyTest {
|
||||||
|
|
||||||
// TODO: filtering redirect test
|
// TODO: filtering redirect test
|
||||||
|
|
||||||
@Test(invocationCount = 50, timeOut = 5000)
|
@Test(invocationCount = 25, timeOut = 5000)
|
||||||
public void testGetStringWithHeader() throws MalformedURLException, ExecutionException,
|
public void testGetStringWithHeader() throws MalformedURLException, ExecutionException,
|
||||||
InterruptedException, TimeoutException {
|
InterruptedException, TimeoutException {
|
||||||
assertEquals(client.download("", "test").trim(), "test");
|
assertEquals(client.download("", "test").trim(), "test");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(invocationCount = 50, timeOut = 5000)
|
@Test(invocationCount = 25, timeOut = 5000)
|
||||||
public void testGetString() throws MalformedURLException, ExecutionException,
|
public void testGetString() throws MalformedURLException, ExecutionException,
|
||||||
InterruptedException, TimeoutException {
|
InterruptedException, TimeoutException {
|
||||||
assertEquals(client.download("").trim(), XML);
|
assertEquals(client.download("").trim(), XML);
|
||||||
|
@ -72,32 +72,32 @@ public abstract class BaseHttpCommandExecutorServiceTest extends BaseJettyTest {
|
||||||
{ "qu?stion" } };
|
{ "qu?stion" } };
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(invocationCount = 50, timeOut = 5000, dataProvider = "gets")
|
@Test(invocationCount = 25, timeOut = 5000, dataProvider = "gets")
|
||||||
public void testGetStringSynch(String uri) throws MalformedURLException, ExecutionException,
|
public void testGetStringSynch(String uri) throws MalformedURLException, ExecutionException,
|
||||||
InterruptedException, TimeoutException {
|
InterruptedException, TimeoutException {
|
||||||
// TODO why need trim?
|
// TODO why need trim?
|
||||||
assertEquals(client.synch(uri).trim(), XML);
|
assertEquals(client.synch(uri).trim(), XML);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(invocationCount = 50, timeOut = 5000)
|
@Test(invocationCount = 25, timeOut = 5000)
|
||||||
public void testGetException() throws MalformedURLException, ExecutionException,
|
public void testGetException() throws MalformedURLException, ExecutionException,
|
||||||
InterruptedException, TimeoutException {
|
InterruptedException, TimeoutException {
|
||||||
assertEquals(client.downloadException("", GetOptions.Builder.tail(1)).trim(), "foo");
|
assertEquals(client.downloadException("", GetOptions.Builder.tail(1)).trim(), "foo");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(invocationCount = 50, timeOut = 5000)
|
@Test(invocationCount = 25, timeOut = 5000)
|
||||||
public void testGetSynchException() throws MalformedURLException, ExecutionException,
|
public void testGetSynchException() throws MalformedURLException, ExecutionException,
|
||||||
InterruptedException, TimeoutException {
|
InterruptedException, TimeoutException {
|
||||||
assertEquals(client.synchException("", "").trim(), "foo");
|
assertEquals(client.synchException("", "").trim(), "foo");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(invocationCount = 50, timeOut = 5000)
|
@Test(invocationCount = 25, timeOut = 5000)
|
||||||
public void testGetStringRedirect() throws MalformedURLException, ExecutionException,
|
public void testGetStringRedirect() throws MalformedURLException, ExecutionException,
|
||||||
InterruptedException, TimeoutException {
|
InterruptedException, TimeoutException {
|
||||||
assertEquals(client.download("redirect").trim(), XML2);
|
assertEquals(client.download("redirect").trim(), XML2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(enabled = false, invocationCount = 50, timeOut = 5000)
|
@Test(enabled = false, invocationCount = 25, timeOut = 5000)
|
||||||
public void testGetStringPermanentRedirect() throws MalformedURLException, ExecutionException,
|
public void testGetStringPermanentRedirect() throws MalformedURLException, ExecutionException,
|
||||||
InterruptedException, TimeoutException {
|
InterruptedException, TimeoutException {
|
||||||
// GetString get = factory.createGetString("permanentredirect");
|
// GetString get = factory.createGetString("permanentredirect");
|
||||||
|
@ -107,13 +107,13 @@ public abstract class BaseHttpCommandExecutorServiceTest extends BaseJettyTest {
|
||||||
// TODO assert misses are only one, as permanent redirects paths should be remembered.
|
// TODO assert misses are only one, as permanent redirects paths should be remembered.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(invocationCount = 50, timeOut = 5000)
|
@Test(invocationCount = 25, timeOut = 5000)
|
||||||
public void testPost() throws MalformedURLException, ExecutionException, InterruptedException,
|
public void testPost() throws MalformedURLException, ExecutionException, InterruptedException,
|
||||||
TimeoutException {
|
TimeoutException {
|
||||||
assertEquals(client.post("", "foo").trim(), "fooPOST");
|
assertEquals(client.post("", "foo").trim(), "fooPOST");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(invocationCount = 50, timeOut = 10000)
|
@Test(invocationCount = 25, timeOut = 10000)
|
||||||
public void testPostAsInputStream() throws MalformedURLException, ExecutionException,
|
public void testPostAsInputStream() throws MalformedURLException, ExecutionException,
|
||||||
InterruptedException, TimeoutException {
|
InterruptedException, TimeoutException {
|
||||||
try {
|
try {
|
||||||
|
@ -136,38 +136,38 @@ public abstract class BaseHttpCommandExecutorServiceTest extends BaseJettyTest {
|
||||||
assert postFailures.get() > 0;
|
assert postFailures.get() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(invocationCount = 50, timeOut = 5000)
|
@Test(invocationCount = 25, timeOut = 5000)
|
||||||
public void testPostBinder() throws MalformedURLException, ExecutionException,
|
public void testPostBinder() throws MalformedURLException, ExecutionException,
|
||||||
InterruptedException, TimeoutException {
|
InterruptedException, TimeoutException {
|
||||||
assertEquals(client.postJson("", "foo").trim(), "{\"key\":\"foo\"}POST");
|
assertEquals(client.postJson("", "foo").trim(), "{\"key\":\"foo\"}POST");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(invocationCount = 50, timeOut = 5000)
|
@Test(invocationCount = 25, timeOut = 5000)
|
||||||
public void testPut() throws MalformedURLException, ExecutionException, InterruptedException,
|
public void testPut() throws MalformedURLException, ExecutionException, InterruptedException,
|
||||||
TimeoutException {
|
TimeoutException {
|
||||||
assertEquals(client.upload("", "foo").trim(), "fooPUT");
|
assertEquals(client.upload("", "foo").trim(), "fooPUT");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(invocationCount = 50, timeOut = 5000)
|
@Test(invocationCount = 25, timeOut = 5000)
|
||||||
public void testPutRedirect() throws MalformedURLException, ExecutionException,
|
public void testPutRedirect() throws MalformedURLException, ExecutionException,
|
||||||
InterruptedException, TimeoutException {
|
InterruptedException, TimeoutException {
|
||||||
assertEquals(client.upload("redirect", "foo").trim(), "fooPUTREDIRECT");
|
assertEquals(client.upload("redirect", "foo").trim(), "fooPUTREDIRECT");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(invocationCount = 50, timeOut = 5000)
|
@Test(invocationCount = 25, timeOut = 5000)
|
||||||
public void testKillRobotSlowly() throws MalformedURLException, ExecutionException,
|
public void testKillRobotSlowly() throws MalformedURLException, ExecutionException,
|
||||||
InterruptedException, TimeoutException {
|
InterruptedException, TimeoutException {
|
||||||
assertEquals(client.action("robot", "kill", ImmutableMap.of("death", "slow")).trim(),
|
assertEquals(client.action("robot", "kill", ImmutableMap.of("death", "slow")).trim(),
|
||||||
"robot->kill:{death=slow}");
|
"robot->kill:{death=slow}");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(invocationCount = 50, timeOut = 5000)
|
@Test(invocationCount = 25, timeOut = 5000)
|
||||||
public void testHead() throws MalformedURLException, ExecutionException, InterruptedException,
|
public void testHead() throws MalformedURLException, ExecutionException, InterruptedException,
|
||||||
TimeoutException {
|
TimeoutException {
|
||||||
assert client.exists("");
|
assert client.exists("");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(invocationCount = 50, timeOut = 5000)
|
@Test(invocationCount = 25, timeOut = 5000)
|
||||||
public void testGetAndParseSax() throws MalformedURLException, ExecutionException,
|
public void testGetAndParseSax() throws MalformedURLException, ExecutionException,
|
||||||
InterruptedException, TimeoutException {
|
InterruptedException, TimeoutException {
|
||||||
assertEquals(client.downloadAndParse(""), "whoppers");
|
assertEquals(client.downloadAndParse(""), "whoppers");
|
||||||
|
|
Loading…
Reference in New Issue