Skip to content
Permalink
Browse files

Make baseURLSet static to avoid running baseURL code with each request

- Add support for enabling many object creation IT with a sytem property, disabled by default

Resolves: https://www.pivotaltracker.com/story/show/77492702
  • Loading branch information...
escowles authored and awoods committed Aug 23, 2014
1 parent 82a0596 commit db1180e899c3ad9bbb65dc2f226c86b1417df7d1
@@ -141,7 +141,7 @@
protected Session session;

private static final Logger LOGGER = getLogger(FedoraNodes.class);
private boolean baseURLSet = false;
private static boolean baseURLSet = false;

/**
* Set the baseURL for JMS events.
@@ -136,6 +136,7 @@
*/
public class FedoraNodesIT extends AbstractResourceIT {

private static final String TEST_ACTIVATION_PROPERTY = "RUN_TEST_CREATE_MANY";
private SimpleDateFormat headerFormat;
private SimpleDateFormat tripleFormat;

@@ -280,6 +281,21 @@ public void testDeleteObject() throws Exception {
getStatus(new HttpGet(location)));
}

@Test
public void testCreateManyObjects() throws Exception {
if (System.getProperty(TEST_ACTIVATION_PROPERTY) == null) {
logger.info("Not running test because system property not set: {}", TEST_ACTIVATION_PROPERTY);
return;
}

final int manyObjects = 2000;
for ( int i = 0; i < manyObjects; i++ ) {
Thread.sleep(10); // needed to prevent overloading
final HttpResponse response = createObject("");
logger.debug( response.getFirstHeader("Location").getValue() );
}
}

@Test
public void testDeleteWithBadEtag() throws Exception {

0 comments on commit db1180e

Please sign in to comment.
You can’t perform that action at this time.