gpt4 book ai didi

scala - 无法在 Intellij Idea 中为 scala 项目运行集成测试

转载 作者:行者123 更新时间:2023-12-01 07:40:39 25 4
gpt4 key购买 nike

我正在使用以下版本的 Intellij Idea

IntelliJ IDEA 2019.1.3 (Community Edition)
Build #IC-191.7479.19, built on May 28, 2019
JRE: 1.8.0_202-release-1483-b58 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6

我已经导入了一个 sbt 项目并且能够成功运行单元测试用例。但是,一旦我运行包含集成测试用例的测试套件,我就会收到以下错误

Testing started at 14:57 ...
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java "-javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=53306:/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Users/user/Library/Application Support/IdeaIC2019.1/Scala/lib/runners.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/lib/tools.jar:/Users/user/IdeaProjects/sampleProject/hive/server/target/scala-2.12/test-classes:/Users/user/IdeaProjects/sampleProject/hive/server/target/scala-2.12/classes:/Users/user/IdeaProjects/sampleProject/common/queue/target/scala-2.12/test-classes:/Users/user/IdeaProjects/sampleProject/common/queue/target/scala-2.12/classes:/Users/user/IdeaProjects/sampleProject/common/event/target/scala-2.12/classes:/Users/user/IdeaProjects/sampleProject/common/test/target/scala-2.12/classes:/Users/user/IdeaProjects/sampleProject/edr/events/target/scala-2.12/test-classes:/Users/user/IdeaProjects/sampleProject/edr/events/target/scala-2.12/classes:/Users/user/IdeaProjects/sampleProject/hive/api/target/scala-2.12/classes:/Users/user/IdeaProjects/sampleProject/hive/dao/target/scala-2.12/classes:/Users/user/IdeaProjects/sampleProject/hive/events/target/scala-2.12/test-classes:/Users/user/IdeaProjects/sampleProject/hive/events/target/scala-2.12/classes:/Users/user/IdeaProjects/sampleProject/mailer/flows/target/scala-2.12/classes:/Users/user/IdeaProjects/sampleProject/mailer/templates/.jvm/target/scala-2.12/test-classes:/Users/user/IdeaProjects/sampleProject/mailer/templates/.jvm/target/scala-2.12/classes:/Users/user/IdeaProjects/sampleProject/payments/data/target/scala-2.12/classes:/Users/user/IdeaProjects/sampleProject/tenants/data/target/scala-2.12/classes:/Users/user/IdeaProjects/sampleProject/mailer/mandrill-api/target/scala-2.12/test-classes:/Users/user/IdeaProjects/sampleProject/mailer/mandrill-api/target/scala-2.12/classes:/Users/user/IdeaProjects/sampleProject/monitor/events/target/scala-2.12/test-classes:/Users/user/IdeaProjects/sampleProject/monitor/events/target/scala-2.12/classes:/Users/user/IdeaProjects/sampleProject/scoring/events/target/scala-2.12/test-classes:/Users/user/IdeaProjects/sampleProject/scoring/events/target/scala-2.12/classes:/Users/user/.ivy2/cache/ch.qos.logback/logback-classic/jars/logback-classic-1.2.3.jar:/Users/user/.ivy2/cache/ch.qos.logback/logback-core/jars/logback-core-1.2.3.jar:/Users/user/.ivy2/cache/com.amazonaws/aws-java-sdk-core/jars/aws-java-sdk-core-1.11.342.jar:/Users/user/.ivy2/cache/com.amazonaws/aws-java-sdk-dynamodb/jars/aws-java-sdk-dynamodb-1.11.285.jar:/Users/user/.ivy2/cache/com.amazonaws/aws-java-sdk-ec2/jars/aws-java-sdk-ec2-1.11.285.jar:/Users/user/.ivy2/cache/com.amazonaws/aws-java-sdk-emr/jars/aws-java-sdk-emr-1.11.285.jar:/Users/user/.ivy2/cache/com.amazonaws/aws-java-sdk-iam/jars/aws-java-sdk-iam-1.11.285.jar:/Users/user/.ivy2/cache/com.amazonaws/aws-java-sdk-kinesis/jars/aws-java-sdk-kinesis-1.11.342.jar:/Users/user/.ivy2/cache/com.amazonaws/aws-java-sdk-kms/jars/aws-java-sdk-kms-1.11.285.jar:/Users/user/.ivy2/cache/com.amazonaws/aws-java-sdk-redshift/jars/aws-java-sdk-redshift-1.11.285.jar:/Users/user/.ivy2/cache/com.amazonaws/aws-java-sdk-s3/jars/aws-java-sdk-s3-1.11.285.jar:/Users/user/.ivy2/cache/com.amazonaws/aws-java-sdk-simpledb/jars/aws-java-sdk-simpledb-1.11.285.jar:/Users/user/.ivy2/cache/com.amazonaws/aws-java-sdk-sns/jars/aws-java-sdk-sns-1.11.342.jar:/Users/user/.ivy2/cache/com.amazonaws/aws-java-sdk-sqs/jars/aws-java-sdk-sqs-1.11.342.jar:/Users/user/.ivy2/cache/com.amazonaws/aws-java-sdk-stepfunctions/jars/aws-java-sdk-stepfunctions-1.11.285.jar:/Users/user/.ivy2/cache/com.amazonaws/aws-java-sdk-sts/jars/aws-java-sdk-sts-1.11.342.jar:/Users/user/.ivy2/cache/com.amazonaws/jmespath-java/jars/jmespath-java-1.11.342.jar:/Users/user/.ivy2/cache/com.chuusai/shapeless_2.12/bundles/shapeless_2.12-2.3.3.jar:/Users/user/.ivy2/cache/com.fasterxml.jackson.core/jackson-annotations/bundles/jackson-annotations-2.9.8.jar:/Users/user/.ivy2/cache/com.fasterxml.jackson.core/jackson-core/bundles/jackson-core-2.9.8.jar:/Users/user/.ivy2/cache/com.fasterxml.jackson.core/jackson-databind/bundles/jackson-databind-2.9.8.jar:/Users/user/.ivy2/cache/com.fasterxml.jackson.dataformat/jackson-dataformat-cbor/bundles/jackson-dataformat-cbor-2.9.8.jar:/Users/user/.ivy2/cache/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/bundles/jackson-dataformat-yaml-2.9.6.jar:/Users/user/.ivy2/cache/com.fasterxml.jackson.datatype/jackson-datatype-guava/bundles/jackson-datatype-guava-2.9.4.jar:/Users/user/.ivy2/cache/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/bundles/jackson-datatype-jdk8-2.8.11.jar:/Users/user/.ivy2/cache/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/bundles/jackson-datatype-jsr310-2.8.11.jar:/Users/user/.ivy2/cache/com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/bundles/jackson-jaxrs-base-2.9.4.jar:/Users/user/.ivy2/cache/com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/bundles/jackson-jaxrs-json-provider-2.9.4.jar:/Users/user/.ivy2/cache/com.fasterxml.jackson.module/jackson-module-jaxb-annotations/bundles/jackson-module-jaxb-annotations-2.9.4.jar:/Users/user/.ivy2/cache/com.fasterxml.jackson.module/jackson-module-paranamer/bundles/jackson-module-paranamer-2.9.8.jar:/Users/user/.ivy2/cache/com.fasterxml.jackson.module/jackson-module-scala_2.12/bundles/jackson-module-scala_2.12-2.9.8.jar:/Users/user/.ivy2/cache/com.fasterxml.uuid/java-uuid-generator/bundles/java-uuid-generator-3.1.5.jar:/Users/user/.ivy2/cache/com.github.jnr/jffi/jars/jffi-1.2.15.jar:/Users/user/.ivy2/cache/com.github.jnr/jffi/jars/jffi-1.2.15-native.jar:/Users/user/.ivy2/cache/com.github.jnr/jnr-constants/jars/jnr-constants-0.9.8.jar:/Users/user/.ivy2/cache/com.github.jnr/jnr-enxio/jars/jnr-enxio-0.16.jar:/Users/user/.ivy2/cache/com.github.jnr/jnr-ffi/jars/jnr-ffi-2.1.4.jar:/Users/user/.ivy2/cache/com.github.jnr/jnr-posix/jars/jnr-posix-3.0.35.jar:/Users/user/.ivy2/cache/com.github.jnr/jnr-unixsocket/jars/jnr-unixsocket-0.18.jar:/Users/user/.ivy2/cache/com.github.jnr/jnr-x86asm/jars/jnr-x86asm-1.0.2.jar:/Users/user/.ivy2/cache/com.github.julien-truffaut/monocle-core_2.12/jars/monocle-core_2.12-1.4.0.jar:/Users/user/.ivy2/cache/com.github.seratch/awscala-core_2.12/jars/awscala-core_2.12-0.7.2.jar:/Users/user/.ivy2/cache/com.github.seratch/awscala-dynamodb_2.12/jars/awscala-dynamodb_2.12-0.7.2.jar:/Users/user/.ivy2/cache/com.github.seratch/awscala-ec2_2.12/jars/awscala-ec2_2.12-0.7.2.jar:/Users/user/.ivy2/cache/com.github.seratch/awscala-emr_2.12/jars/awscala-emr_2.12-0.7.2.jar:/Users/user/.ivy2/cache/com.github.seratch/awscala-iam_2.12/jars/awscala-iam_2.12-0.7.2.jar:/Users/user/.ivy2/cache/com.github.seratch/awscala-redshift_2.12/jars/awscala-redshift_2.12-0.7.2.jar:/Users/user/.ivy2/cache/com.github.seratch/awscala-s3_2.12/jars/awscala-s3_2.12-0.7.2.jar:/Users/user/.ivy2/cache/com.github.seratch/awscala-simpledb_2.12/jars/awscala-simpledb_2.12-0.7.2.jar:/Users/user/.ivy2/cache/com.github.seratch/awscala-sqs_2.12/jars/awscala-sqs_2.12-0.7.2.jar:/Users/user/.ivy2/cache/com.github.seratch/awscala-stepfunctions_2.12/jars/awscala-stepfunctions_2.12-0.7.2.jar:/Users/user/.ivy2/cache/com.github.seratch/awscala-sts_2.12/jars/awscala-sts_2.12-0.7.2.jar:/Users/user/.ivy2/cache/com.github.seratch/awscala_2.12/jars/awscala_2.12-0.7.2.jar:/Users/user/.ivy2/cache/com.github.swagger-akka-http/swagger-akka-http_2.12/jars/swagger-akka-http_2.12-0.14.1.jar:/Users/user/.ivy2/cache/com.github.tminglei/slick-pg_2.12/jars/slick-pg_2.12-0.16.3.jar:/Users/user/.ivy2/cache/com.github.tminglei/slick-pg_circe-json_2.12/jars/slick-pg_circe-json_2.12-0.16.3.jar:/Users/user/.ivy2/cache/com.github.tminglei/slick-pg_core_2.12/jars/slick-pg_core_2.12-0.16.3.jar:/Users/user/.ivy2/cache/com.github.virtuald/curvesapi/jars/curvesapi-1.04.jar:/Users/user/.ivy2/cache/com.google.api-client/google-api-client/jars/google-api-client-1.23.0.jar:/Users/user/.ivy2/cache/com.google.apis/google-api-services-safebrowsing/jars/google-api-services-safebrowsing-v4-rev44-1.23.0.jar:/Users/user/.ivy2/cache/com.google.code.findbugs/jsr305/jars/jsr305-1.3.9.jar:/Users/user/.ivy2/cache/com.google.code.findbugs/jsr305/jars/jsr305-3.0.1.jar:/Users/user/.ivy2/cache/com.google.guava/guava/bundles/guava-20.0.jar:/Users/user/.ivy2/cache/com.google.http-client/google-http-client/jars/google-http-client-1.23.0.jar:/Users/user/.ivy2/cache/com.google.http-client/google-http-client-jackson2/jars/google-http-client-jackson2-1.23.0.jar:/Users/user/.ivy2/cache/com.google.oauth-client/google-oauth-client/jars/google-oauth-client-1.23.0.jar:/Users/user/.ivy2/cache/com.iheart/ficus_2.12/jars/ficus_2.12-1.4.3.jar:/Users/user/.ivy2/cache/com.itextpdf/itextpdf/jars/itextpdf-5.5.11.jar:/Users/user/.ivy2/cache/com.lightbend.akka/akka-stream-alpakka-csv_2.12/jars/akka-stream-alpakka-csv_2.12-0.20.jar:/Users/user/.ivy2/cache/com.lightbend.akka/akka-stream-alpakka-kinesis_2.12/jars/akka-stream-alpakka-kinesis_2.12-0.20.jar:/Users/user/.ivy2/cache/com.lightbend.akka/akka-stream-alpakka-s3_2.12/jars/akka-stream-alpakka-s3_2.12-0.20.jar:/Users/user/.ivy2/cache/com.lightbend.akka/akka-stream-alpakka-sqs_2.12/jars/akka-stream-alpakka-sqs_2.12-0.20.jar:/Users/user/.ivy2/cache/com.mandrillapp.wrapper.lutung/lutung/jars/lutung-0.0.8.jar:/Users/user/.ivy2/cache/com.nrinaudo/kantan.codecs-cats_2.12/jars/kantan.codecs-cats_2.12-0.4.0.jar:/Users/user/.ivy2/cache/com.nrinaudo/kantan.codecs-shapeless_2.12/jars/kantan.codecs-shapeless_2.12-0.4.0.jar:/Users/user/.ivy2/cache/com.nrinaudo/kantan.codecs_2.12/jars/kantan.codecs_2.12-0.4.0.jar:/Users/user/.ivy2/cache/com.nrinaudo/kantan.csv-cats_2.12/jars/kantan.csv-cats_2.12-0.4.0.jar:/Users/user/.ivy2/cache/com.nrinaudo/kantan.csv-generic_2.12/jars/kantan.csv-generic_2.12-0.4.0.jar:/Users/user/.ivy2/cache/com.nrinaudo/kantan.csv_2.12/jars/kantan.csv_2.12-0.4.0.jar:/Users/user/.ivy2/cache/com.osinka.i18n/scala-i18n_2.12/jars/scala-i18n_2.12-1.0.2.jar:/Users/user/.ivy2/cache/com.pauldijou/jwt-circe_2.12/jars/jwt-circe_2.12-0.16.0.jar:/Users/user/.ivy2/cache/com.pauldijou/jwt-core-impl_2.12/jars/jwt-core-impl_2.12-0.16.0.jar:/Users/user/.ivy2/cache/com.pauldijou/jwt-core_2.12/jars/jwt-core_2.12-0.16.0.jar:/Users/user/.ivy2/cache/com.pauldijou/jwt-json-common_2.12/jars/jwt-json-common_2.12-0.16.0.jar:/Users/user/.ivy2/cache/com.spotify/docker-client/jars/docker-client-8.11.5.jar:/Users/user/.ivy2/cache/com.sun.mail/javax.mail/jars/javax.mail-1.6.1.jar:/Users/user/.ivy2/cache/com.thoughtworks.paranamer/paranamer/bundles/paranamer-2.8.jar:/Users/user/.ivy2/cache/com.typesafe/config/bundles/config-1.3.3.jar:/Users/user/.ivy2/cache/com.typesafe/ssl-config-core_2.12/bundles/ssl-config-core_2.12-0.3.6.jar:/Users/user/.ivy2/cache/com.typesafe.akka/akka-actor_2.12/jars/akka-actor_2.12-2.5.19.jar:/Users/user/.ivy2/cache/com.typesafe.akka/akka-http-core_2.12/jars/akka-http-core_2.12-10.1.7.jar:/Users/user/.ivy2/cache/com.typesafe.akka/akka-http-testkit_2.12/jars/akka-http-testkit_2.12-10.1.7.jar:/Users/user/.ivy2/cache/com.typesafe.akka/akka-http-xml_2.12/jars/akka-http-xml_2.12-10.1.7.jar:/Users/user/.ivy2/cache/com.typesafe.akka/akka-http_2.12/jars/akka-http_2.12-10.1.7.jar:/Users/user/.ivy2/cache/com.typesafe.akka/akka-parsing_2.12/jars/akka-parsing_2.12-10.1.7.jar:/Users/user/.ivy2/cache/com.typesafe.akka/akka-protobuf_2.12/jars/akka-protobuf_2.12-2.5.19.jar:/Users/user/.ivy2/cache/com.typesafe.akka/akka-slf4j_2.12/jars/akka-slf4j_2.12-2.5.19.jar:/Users/user/.ivy2/cache/com.typesafe.akka/akka-stream-testkit_2.12/jars/akka-stream-testkit_2.12-2.5.19.jar:/Users/user/.ivy2/cache/com.typesafe.akka/akka-stream_2.12/jars/akka-stream_2.12-2.5.19.jar:/Users/user/.ivy2/cache/com.typesafe.akka/akka-testkit_2.12/jars/akka-testkit_2.12-2.5.19.jar:/Users/user/.ivy2/cache/com.typesafe.play/play-functional_2.12/jars/play-functional_2.12-2.6.12.jar:/Users/user/.ivy2/cache/com.typesafe.play/play-json_2.12/jars/play-json_2.12-2.6.12.jar:/Users/user/.ivy2/cache/com.typesafe.slick/slick-hikaricp_2.12/bundles/slick-hikaricp_2.12-3.2.3.jar:/Users/user/.ivy2/cache/com.typesafe.slick/slick_2.12/bundles/slick_2.12-3.2.3.jar:/Users/user/.ivy2/cache/com.whisk/docker-testkit-core_2.12/jars/docker-testkit-core_2.12-0.9.8.jar:/Users/user/.ivy2/cache/com.whisk/docker-testkit-impl-spotify_2.12/jars/docker-testkit-impl-spotify_2.12-0.9.8.jar:/Users/user/.ivy2/cache/com.whisk/docker-testkit-scalatest_2.12/jars/docker-testkit-scalatest_2.12-0.9.8.jar:/Users/user/.ivy2/cache/com.zaxxer/HikariCP/bundles/HikariCP-2.5.1.jar:/Users/user/.ivy2/cache/commons-codec/commons-codec/jars/commons-codec-1.10.jar:/Users/user/.ivy2/cache/commons-io/commons-io/jars/commons-io-2.6.jar:/Users/user/.ivy2/cache/commons-lang/commons-lang/jars/commons-lang-2.6.jar:/Users/user/.ivy2/cache/commons-logging/commons-logging/jars/commons-logging-1.1.3.jar:/Users/user/.ivy2/cache/de.heikoseeberger/akka-http-circe_2.12/jars/akka-http-circe_2.12-1.21.0.jar:/Users/user/.ivy2/cache/io.circe/circe-core_2.12/jars/circe-core_2.12-0.9.3.jar:/Users/user/.ivy2/cache/io.circe/circe-generic-extras_2.12/jars/circe-generic-extras_2.12-0.9.3.jar:/Users/user/.ivy2/cache/io.circe/circe-generic_2.12/jars/circe-generic_2.12-0.9.3.jar:/Users/user/.ivy2/cache/io.circe/circe-java8_2.12/jars/circe-java8_2.12-0.9.3.jar:/Users/user/.ivy2/cache/io.circe/circe-jawn_2.12/jars/circe-jawn_2.12-0.9.3.jar:/Users/user/.ivy2/cache/io.circe/circe-numbers_2.12/jars/circe-numbers_2.12-0.9.3.jar:/Users/user/.ivy2/cache/io.circe/circe-optics_2.12/jars/circe-optics_2.12-0.9.3.jar:/Users/user/.ivy2/cache/io.circe/circe-parser_2.12/jars/circe-parser_2.12-0.9.3.jar:/Users/user/.ivy2/cache/io.github.nremond/pbkdf2-scala_2.12/jars/pbkdf2-scala_2.12-0.6.3.jar:/Users/user/.ivy2/cache/io.sentry/sentry/jars/sentry-1.7.5.jar:/Users/user/.ivy2/cache/io.sentry/sentry-logback/jars/sentry-logback-1.7.5.jar:/Users/user/.ivy2/cache/io.swagger/swagger-annotations/bundles/swagger-annotations-1.5.20.jar:/Users/user/.ivy2/cache/io.swagger/swagger-core/jars/swagger-core-1.5.20.jar:/Users/user/.ivy2/cache/io.swagger/swagger-jaxrs/bundles/swagger-jaxrs-1.5.20.jar:/Users/user/.ivy2/cache/io.swagger/swagger-models/bundles/swagger-models-1.5.20.jar:/Users/user/.ivy2/cache/javax.activation/activation/jars/activation-1.1.jar:/Users/user/.ivy2/cache/javax.annotation/javax.annotation-api/jars/javax.annotation-api-1.2.jar:/Users/user/.ivy2/cache/javax.validation/validation-api/jars/validation-api-1.1.0.Final.jar:/Users/user/.ivy2/cache/javax.ws.rs/javax.ws.rs-api/jars/javax.ws.rs-api-2.0.1.jar:/Users/user/.ivy2/cache/javax.xml.bind/jaxb-api/jars/jaxb-api-2.3.0.jar:/Users/user/.ivy2/cache/joda-time/joda-time/jars/joda-time-2.9.9.jar:/Users/user/.ivy2/cache/net.bytebuddy/byte-buddy/jars/byte-buddy-1.7.9.jar:/Users/user/.ivy2/cache/net.bytebuddy/byte-buddy-agent/jars/byte-buddy-agent-1.7.9.jar:/Users/user/.ivy2/cache/net.sf.jtidy/jtidy/jars/jtidy-r938.jar:/Users/user/.ivy2/cache/org.apache.commons/commons-compress/jars/commons-compress-1.9.jar:/Users/user/.ivy2/cache/org.apache.commons/commons-lang3/jars/commons-lang3-3.2.1.jar:/Users/user/.ivy2/cache/org.apache.httpcomponents/httpclient/jars/httpclient-4.5.5.jar:/Users/user/.ivy2/cache/org.apache.httpcomponents/httpcore/jars/httpcore-4.4.9.jar:/Users/user/.ivy2/cache/org.apache.logging.log4j/log4j-to-slf4j/jars/log4j-to-slf4j-2.2.jar:/Users/user/.ivy2/cache/org.apache.poi/poi/jars/poi-3.15-beta2.jar:/Users/user/.ivy2/cache/org.apache.poi/poi-ooxml/jars/poi-ooxml-3.15-beta2.jar:/Users/user/.ivy2/cache/org.apache.poi/poi-ooxml-schemas/jars/poi-ooxml-schemas-3.15-beta2.jar:/Users/user/.ivy2/cache/org.apache.xmlbeans/xmlbeans/jars/xmlbeans-2.6.0.jar:/Users/user/.ivy2/cache/org.bouncycastle/bcpkix-jdk15on/jars/bcpkix-jdk15on-1.57.jar:/Users/user/.ivy2/cache/org.bouncycastle/bcpkix-jdk15on/jars/bcpkix-jdk15on-1.59.jar:/Users/user/.ivy2/cache/org.bouncycastle/bcprov-jdk15on/jars/bcprov-jdk15on-1.57.jar:/Users/user/.ivy2/cache/org.bouncycastle/bcprov-jdk15on/jars/bcprov-jdk15on-1.59.jar:/Users/user/.ivy2/cache/org.flywaydb/flyway-core/jars/flyway-core-4.2.0.jar:/Users/user/.ivy2/cache/org.glassfish.hk2/hk2-api/jars/hk2-api-2.4.0-b34.jar:/Users/user/.ivy2/cache/org.glassfish.hk2/hk2-locator/jars/hk2-locator-2.4.0-b34.jar:/Users/user/.ivy2/cache/org.glassfish.hk2/hk2-utils/jars/hk2-utils-2.4.0-b34.jar:/Users/user/.ivy2/cache/org.glassfish.hk2/osgi-resource-locator/jars/osgi-resource-locator-1.0.1.jar:/Users/user/.ivy2/cache/org.glassfish.hk2.external/aopalliance-repackaged/jars/aopalliance-repackaged-2.4.0-b34.jar:/Users/user/.ivy2/cache/org.glassfish.hk2.external/javax.inject/jars/javax.inject-2.4.0-b34.jar:/Users/user/.ivy2/cache/org.glassfish.jersey.bundles.repackaged/jersey-guava/bundles/jersey-guava-2.22.2.jar:/Users/user/.ivy2/cache/org.glassfish.jersey.connectors/jersey-apache-connector/jars/jersey-apache-connector-2.22.2.jar:/Users/user/.ivy2/cache/org.glassfish.jersey.core/jersey-client/jars/jersey-client-2.22.2.jar:/Users/user/.ivy2/cache/org.glassfish.jersey.core/jersey-common/jars/jersey-common-2.22.2.jar:/Users/user/.ivy2/cache/org.glassfish.jersey.ext/jersey-entity-filtering/jars/jersey-entity-filtering-2.22.2.jar:/Users/user/.ivy2/cache/org.glassfish.jersey.media/jersey-media-json-jackson/jars/jersey-media-json-jackson-2.22.2.jar:/Users/user/.ivy2/cache/org.javassist/javassist/bundles/javassist-3.21.0-GA.jar:/Users/user/.ivy2/cache/org.joda/joda-convert/jars/joda-convert-2.0.jar:/Users/user/.ivy2/cache/org.mockito/mockito-core/jars/mockito-core-2.13.0.jar:/Users/user/.ivy2/cache/org.objenesis/objenesis/jars/objenesis-2.6.jar:/Users/user/.ivy2/cache/org.ow2.asm/asm/jars/asm-5.0.3.jar:/Users/user/.ivy2/cache/org.ow2.asm/asm-analysis/jars/asm-analysis-5.0.3.jar:/Users/user/.ivy2/cache/org.ow2.asm/asm-commons/jars/asm-commons-5.0.3.jar:/Users/user/.ivy2/cache/org.ow2.asm/asm-tree/jars/asm-tree-5.0.3.jar:/Users/user/.ivy2/cache/org.ow2.asm/asm-util/jars/asm-util-5.0.3.jar:/Users/user/.ivy2/cache/org.postgresql/postgresql/bundles/postgresql-42.2.5.jar:/Users/user/.ivy2/cache/org.reactivestreams/reactive-streams/jars/reactive-streams-1.0.2.jar:/Users/user/.ivy2/cache/org.reflections/reflections/jars/reflections-0.9.11.jar:/Users/user/.ivy2/cache/org.scala-lang/scala-compiler/jars/scala-compiler-2.12.8.jar:/Users/user/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.12.8.jar:/Users/user/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.12.8.jar:/Users/user/.ivy2/cache/org.scala-lang.modules/scala-java8-compat_2.12/bundles/scala-java8-compat_2.12-0.8.0.jar:/Users/user/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.12/bundles/scala-parser-combinators_2.12-1.1.1.jar:/Users/user/.ivy2/cache/org.scala-lang.modules/scala-xml_2.12/bundles/scala-xml_2.12-1.1.1.jar:/Users/user/.ivy2/cache/org.scalactic/scalactic_2.12/bundles/scalactic_2.12-3.0.5.jar:/Users/user/.ivy2/cache/org.scalamock/scalamock-core_2.12/jars/scalamock-core_2.12-3.6.0.jar:/Users/user/.ivy2/cache/org.scalamock/scalamock-scalatest-support_2.12/jars/scalamock-scalatest-support_2.12-3.6.0.jar:/Users/user/.ivy2/cache/org.scalatest/scalatest_2.12/bundles/scalatest_2.12-3.0.5.jar:/Users/user/.ivy2/cache/org.scalatra.scalate/scalate-core_2.12/jars/scalate-core_2.12-1.8.0.jar:/Users/user/.ivy2/cache/org.scalatra.scalate/scalate-util_2.12/jars/scalate-util_2.12-1.8.0.jar:/Users/user/.ivy2/cache/org.scalaz/scalaz-core_2.12/bundles/scalaz-core_2.12-7.2.8.jar:/Users/user/.ivy2/cache/org.scaldi/scaldi_2.12/jars/scaldi_2.12-0.5.8.jar:/Users/user/.ivy2/cache/org.scommons.service/scommons-service-dao_2.12/jars/scommons-service-dao_2.12-0.1.0.jar:/Users/user/.ivy2/cache/org.slf4j/jcl-over-slf4j/jars/jcl-over-slf4j-1.7.25.jar:/Users/user/.ivy2/cache/org.slf4j/jul-to-slf4j/jars/jul-to-slf4j-1.7.25.jar:/Users/user/.ivy2/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.7.25.jar:/Users/user/.ivy2/cache/org.spire-math/imp_2.12/jars/imp_2.12-0.3.0.jar:/Users/user/.ivy2/cache/org.spire-math/jawn-parser_2.12/jars/jawn-parser_2.12-0.11.1.jar:/Users/user/.ivy2/cache/org.typelevel/cats-core_2.12/jars/cats-core_2.12-1.1.0.jar:/Users/user/.ivy2/cache/org.typelevel/cats-kernel_2.12/jars/cats-kernel_2.12-1.1.0.jar:/Users/user/.ivy2/cache/org.typelevel/cats-macros_2.12/jars/cats-macros_2.12-1.1.0.jar:/Users/user/.ivy2/cache/org.typelevel/machinist_2.12/jars/machinist_2.12-0.6.2.jar:/Users/user/.ivy2/cache/org.typelevel/macro-compat_2.12/jars/macro-compat_2.12-1.1.1.jar:/Users/user/.ivy2/cache/org.webjars/swagger-ui/jars/swagger-ui-2.2.6.jar:/Users/user/.ivy2/cache/org.webjars/webjars-locator-core/jars/webjars-locator-core-0.35.jar:/Users/user/.ivy2/cache/org.xhtmlrenderer/flying-saucer-core/jars/flying-saucer-core-9.1.13.jar:/Users/user/.ivy2/cache/org.xhtmlrenderer/flying-saucer-pdf-itext5/jars/flying-saucer-pdf-itext5-9.1.13.jar:/Users/user/.ivy2/cache/org.yaml/snakeyaml/bundles/snakeyaml-1.18.jar:/Users/user/.ivy2/cache/software.amazon.ion/ion-java/bundles/ion-java-1.0.2.jar:/Users/user/.ivy2/cache/stax/stax-api/jars/stax-api-1.0.1.jar:/Users/user/.ivy2/cache/com.google.code.gson/gson/jars/gson-2.8.5.jar:/Users/user/.ivy2/cache/com.stripe/stripe-java/jars/stripe-java-10.14.0.jar" org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner -s hive.test.AllIntegrationTests -C org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestReporter -showProgressMessages true

Unable to load a Suite class. This could be due to an error in your runpath. Missing class: hive.test.AllIntegrationTests
java.lang.ClassNotFoundException: hive.test.AllIntegrationTests
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.scalatest.tools.Runner$.$anonfun$doRunRunRunDaDoRunRun$6(Runner.scala:1213)
at org.scalatest.tools.Runner$.$anonfun$doRunRunRunDaDoRunRun$6$adapted(Runner.scala:1211)
at scala.collection.TraversableLike.$anonfun$filterImpl$1(TraversableLike.scala:251)
at scala.collection.immutable.List.foreach(List.scala:392)
at scala.collection.TraversableLike.filterImpl(TraversableLike.scala:250)
at scala.collection.TraversableLike.filterImpl$(TraversableLike.scala:248)
at scala.collection.AbstractTraversable.filterImpl(Traversable.scala:108)
at scala.collection.TraversableLike.filter(TraversableLike.scala:262)
at scala.collection.TraversableLike.filter$(TraversableLike.scala:262)
at scala.collection.AbstractTraversable.filter(Traversable.scala:108)
at org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:1211)
at org.scalatest.tools.Runner$.$anonfun$runOptionallyWithPassFailReporter$24(Runner.scala:1031)
at org.scalatest.tools.Runner$.$anonfun$runOptionallyWithPassFailReporter$24$adapted(Runner.scala:1010)
at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:1506)
at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1010)
at org.scalatest.tools.Runner$.run(Runner.scala:850)
at org.scalatest.tools.Runner.run(Runner.scala)
at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.runScalaTest2(ScalaTestRunner.java:131)
at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.main(ScalaTestRunner.java:28)


Process finished with exit code 0

我在 SO ( 'Unable to load a Suite class' while running ScalaTest in IntelliJ ) 上关注了这篇文章,并系统地尝试了人们提供的所有建议。

顺便说一下,当我使用命令行使用命令运行这些相同的测试时,它们运行成功

sbt -mem 2048 "project projectName" test it:test

但是,我无法解决这个问题。我也尝试降级 Intellij 版本以及 Java 版本作为最后的手段,但没有找到任何运气。任何解决我当前问题的建议都将受到高度赞赏。提前致谢!!!

最佳答案

首先确保它在运行 sbt it:test 或者如果你使用子模块 sbt module/it:test

如果没有,sbt 有这个很棒的资源:https://www.scala-sbt.org/1.x/docs/Testing.html#Integration+Tests

作为工作设置的模板,build.sbt:

ThisBuild / name := "project"
ThisBuild / organization := "dk.rohdef.project"
ThisBuild / version := "0.1"
ThisBuild / scalaVersion := "2.13.0"


lazy val IntTest = IntegrationTest extend(Test)

lazy val root = project
.in(file("."))
.configs(IntTest)
.settings(
Defaults.itSettings
)

请注意,如果您运行子项目/模块,您似乎需要为每个模块设置配置和设置。

集成测试应该位于 src/it/scala - 是的,将集成测试缩写为 it 是不好的,但它似乎是事实上的标准:(

然后关闭 IntelliJ,并从您的项目文件夹中删除 .idea(如果偏执,也可以进行备份)。再次打开你的项目,并从 sbt 导入它。我只检查“库源”和“允许覆盖 sbt 版本”,但无论您使用什么配置,它都应该有效。

其他可以尝试的事情

  • 在 IntelliJ 中重新加载 sbt 设置
  • 文件 -> 无效缓存/重启
  • 检查 File 中的设置 -> Settings -> Build, Execution, Deployment -> sbt(包括使用正确的 Java 版本,从经验来看,1.8 似乎是一个不错的选择)
  • 检查 File -> Project Settings -> Project 是否使用了正确的 Java 版本
  • 如果其他方法均无效,请尝试使用干净的设置运行,重命名或删除指定位置的设置文件夹:https://www.jetbrains.com/help/idea/configuring-project-and-ide-settings.html#restore-defaults

关于scala - 无法在 Intellij Idea 中为 scala 项目运行集成测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57557496/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com