我正在尝试通过此插件使用Amazon DynamoDB Local运行 Scala 测试套件: https ://github.com/localytics/sbt-dynamodb 。它有效,但前提是我在命令行 ( sbt start-dynamodb-local
) 上手动启动 DynamoDB Local。我希望它在有人sbt test
在父项目目录中执行时自动启动。根据文档:
让 DynamoDB Local 围绕您的测试自动启动和停止
startDynamoDBLocal := startDynamoDBLocal.dependsOn(compile in Test).value test in Test := (test in Test).dependsOn(startDynamoDBLocal).value testOptions in Test += dynamoDBLocalTestCleanup.value
但这不起作用:
com.amazonaws.SdkClientException: Unable to execute HTTP request: Connect to localhost:8000 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused
我究竟做错了什么?