Skip to content

Commit 9e20dad

Browse files
fix up
Signed-off-by: Ndacyayisenga-droid <[email protected]>
1 parent 34d8008 commit 9e20dad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hiero-enterprise-spring/src/test/java/com/openelements/hiero/spring/test/TopicRepositoryTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,16 @@ void testNullParam() {
3737
@Test
3838
void testFindTopicById() throws HieroException {
3939
final TopicId topicId = topicClient.createTopic();
40-
hieroTestUtils.waitForMirrorNodeRecords();
40+
topicClient.submitMessage(topicId, "topic test visibility");
41+
hieroTestUtils.waitForMirrorNodeRecords(); // Wait until the topic appears on mirror node via message
4142

4243
final Optional<Topic> result = topicRepository.findTopicById(topicId);
4344

4445
Assertions.assertNotNull(result);
45-
Assertions.assertTrue(result.isPresent());
46+
Assertions.assertTrue(result.isPresent(), "Expected topic to be present, but it was not found.");
4647
}
4748

49+
4850
@Test
4951
void testFindTopicByIdReturnsEmptyOptional() throws HieroException {
5052
final TopicId topicId = TopicId.fromString("0.0.0");

0 commit comments

Comments
 (0)