MySQL 集成测试 "Query not found"

MySQL Integration Test "Query not found"

当运行一个测试容器MySQL,

@ClassRule
public static final MySQLContainer mysql = (MySQLContainer) new MySQLContainer("mysql:5.6").withInitScript("init/test.sql")

我收到错误 "Query not found"。

一遍又一遍地检查我的 SQL 语法后,我在 .sql 文件的末尾有一个空白的新行。删除它(所以克拉在我的 INSERT INTO ....; 的末尾)解决了这个问题。