Skip to content

Commit 3b91320

Browse files
facontidavideclaude
andcommitted
Use non-overlapping ports in Groot2Publisher tests
Avoid port conflicts between tests by using distinct port ranges: - Test 2: 1700-1708 (was 1667-1675) - Test 3: 1720 (was 1677) - Test 4: 1730-1734 (was 1687-1691) This prevents potential TIME_WAIT issues on Windows where the subprocess in Test 1 (using port 1667) might not have fully released the port before Test 2 tries to bind to it. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4274888 commit 3b91320

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/gtest_groot2_publisher.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ TEST(Groot2PublisherTest, DestructorCompletesAfterException)
7171
});
7272

7373
auto tree = factory.createTreeFromText(xml_text);
74-
BT::Groot2Publisher publisher(tree, 1667 + i * 2);
74+
BT::Groot2Publisher publisher(tree, 1700 + i * 2);
7575
EXPECT_THROW(tree.tickExactlyOnce(), BT::RuntimeError);
7676
}
7777
}
@@ -85,7 +85,7 @@ TEST(Groot2PublisherTest, DestructorCompletesWithMultipleNodes)
8585
});
8686

8787
auto tree = factory.createTreeFromText(xml_text_sequence);
88-
BT::Groot2Publisher publisher(tree, 1677);
88+
BT::Groot2Publisher publisher(tree, 1720);
8989
EXPECT_THROW(tree.tickExactlyOnce(), BT::RuntimeError);
9090
}
9191

@@ -100,7 +100,7 @@ TEST(Groot2PublisherTest, RapidCreateDestroy)
100100
[](BT::TreeNode&) -> BT::NodeStatus { throw BT::RuntimeError("Rapid test"); });
101101

102102
auto tree = factory.createTreeFromText(xml_text);
103-
BT::Groot2Publisher publisher(tree, 1687 + i * 2);
103+
BT::Groot2Publisher publisher(tree, 1730 + i * 2);
104104
EXPECT_THROW(tree.tickExactlyOnce(), BT::RuntimeError);
105105
}
106106
}

0 commit comments

Comments
 (0)