Removed TreeNode's parent reference to avoid maintaning a reference that could keep live big trees (solves #119 and #126)
This commit is contained in:
@@ -404,7 +404,7 @@ public class SubscriptionsStoreTest {
|
||||
|
||||
@Test
|
||||
public void testRecreatePath_emptyRoot() {
|
||||
TreeNode oldRoot = new TreeNode(null);
|
||||
TreeNode oldRoot = new TreeNode();
|
||||
final SubscriptionsStore.NodeCouple resp = store.recreatePath("/finance", oldRoot);
|
||||
|
||||
//Verify
|
||||
@@ -416,7 +416,7 @@ public class SubscriptionsStoreTest {
|
||||
|
||||
@Test
|
||||
public void testRecreatePath_1layer_tree() {
|
||||
TreeNode oldRoot = new TreeNode(null);
|
||||
TreeNode oldRoot = new TreeNode();
|
||||
final SubscriptionsStore.NodeCouple respFinance = store.recreatePath("/finance", oldRoot);
|
||||
final SubscriptionsStore.NodeCouple respPlus = store.recreatePath("/+", respFinance.root);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public class TreeNodeTest {
|
||||
|
||||
@Test
|
||||
public void testAddSubscriptionOverwriteAnExistingWithDifferentCleanSessionFlag() throws Exception {
|
||||
TreeNode root = new TreeNode(null);
|
||||
TreeNode root = new TreeNode();
|
||||
Subscription existingSub = new Subscription(CLIENT_ID, "/topic", LEAST_ONE, false);
|
||||
root.addSubscription(existingSub);
|
||||
Set<Subscription> subs = root.findAllByClientID(CLIENT_ID);
|
||||
|
||||
Reference in New Issue
Block a user