protected Forum createForum(String title, String type, String content, String tags) {
return createForum(title, type, content, tags, true);
}
protected Forum createForum(String title, String type, String content, String tags, boolean retry) {
Forum forum = null;
try {
loginConnections();
ForumService forumService = getForumService();
long start = System.currentTimeMillis();
forum = new Forum(forumService, "");
forum.setTitle(title);
forum.setContent(content);
forum.setTags(tags);
forum = forumService.createForum(forum);
forum = forumService.getForum(forum.getForumUuid());
long duration = System.currentTimeMillis() - start;
Trace.log("Created test forum: "+forum.getForumUuid() + " took "+duration+"(ms)");
} catch (AuthenticationException pe) {
if (pe.getCause() != null) {
pe.getCause().printStackTrace();
}
Assert.fail("Error authenticating: " + pe.getMessage());