Skip to content

Commit

Permalink
fixes the failing SubscriptionFunctionalTest by removing subs added b…
Browse files Browse the repository at this point in the history
…y PlanetManagerLocalTest.
  • Loading branch information
mbien committed Mar 28, 2021
1 parent 19f7f12 commit 0434cb3
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.apache.roller.planet.business.PlanetManager;
import org.apache.roller.planet.pojos.Planet;
import org.apache.roller.planet.pojos.PlanetGroup;
import org.apache.roller.planet.pojos.Subscription;
import org.apache.roller.weblogger.TestUtils;
import org.apache.roller.weblogger.planet.tasks.RefreshRollerPlanetTask;
import org.apache.roller.weblogger.planet.tasks.SyncWebsitesTask;
Expand Down Expand Up @@ -119,6 +120,14 @@ public void tearDown() throws Exception {
try {
TestUtils.teardownWeblog(testWeblog.getId());
TestUtils.teardownUser(testUser.getUserName());

// remove subscriptions which were added in testRefreshEntries()
PlanetManager m = WebloggerFactory.getWeblogger().getPlanetManager();
PlanetGroup all = m.getGroup(m.getWebloggerById("zzz_default_planet_zzz"), "all");
for (Subscription sub : all.getSubscriptions()) {
m.deleteSubscription(sub);
}

TestUtils.endSession(true);
} catch (Exception ex) {
log.error(ex);
Expand Down

0 comments on commit 0434cb3

Please sign in to comment.