Skip to content

Commit e1ea239

Browse files
committed
feat: unit test for FileSinkConnectorTest.java
1 parent 7594592 commit e1ea239

File tree

1 file changed

+0
-4
lines changed
  • eventmesh-connectors/eventmesh-connector-file/src/test/java/org/apache/eventmesh/connector/file/sink/connector

1 file changed

+0
-4
lines changed

eventmesh-connectors/eventmesh-connector-file/src/test/java/org/apache/eventmesh/connector/file/sink/connector/FileSinkConnectorTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ void testFileSinkConnector() throws Exception {
4949
fileSinkConnector.put(connectRecords);
5050
fileSinkConnector.stop();
5151

52-
// 验证文件是否存在
5352
Calendar calendar = Calendar.getInstance(Locale.CHINA);
5453
int year = calendar.get(Calendar.YEAR);
5554
int month = calendar.get(Calendar.MONTH) + 1;
@@ -60,14 +59,11 @@ void testFileSinkConnector() throws Exception {
6059
String.valueOf(day));
6160
Assertions.assertTrue(Files.exists(topicPath), "Directory for topic should exist");
6261

63-
// 查找是否有文件
6462
Path outputPath = Files.list(topicPath)
6563
.filter(path -> path.toString().contains("test-topic"))
6664
.findFirst()
6765
.orElseThrow(() -> new RuntimeException("No output file found with 'test-topic' in the name"));
6866

69-
70-
// 验证文件内容
7167
List<String> lines = Files.readAllLines(outputPath, StandardCharsets.UTF_8);
7268
String actualContent = String.join("\n", lines);
7369
Assertions.assertEquals(content, actualContent);

0 commit comments

Comments
 (0)