Ash*_*cob 5 java spring jenkins-pipeline testcontainers
我有 5 个春季批量测试,正在使用 testcontainers 在 Jenkins 管道上运行。我仅在其中一项测试中收到以下错误:
\n\n12:51:53 17 Mar 2020;17:51:41.498 [user:] [request:] [main] INFO \n12:51:53 o.testcontainers.DockerClientFactory - Ryuk started - will monitor and terminate Testcontainers containers on JVM exit\n12:51:53 [37m[1m\xe2\x84\xb9\xef\xb8\x8e Checking the system...[0m[0m\n12:51:53 [32m\xe2\x9c\x94 Docker version should be at least 1.6.0[0m\n12:51:53 17 Mar 2020;17:51:41.508 [user:] [request:] [main] DEBUG\n12:51:53 c.g.d.core.command.AbstrDockerCmd - Cmd: f6fc0588843eb76a458bdc25cdc942fed474945aa3cfe7b635220dd1935dbfaa,<null>,true,<null>,<null>,<null>,<null>,{df,-P},<null>,<null>,com.github.dockerjava.core.exec.ExecCreateCmdExec@5cbe877d\n12:51:53 17 Mar 2020;17:51:41.644 [user:] [request:] [tc-okhttp-stream-2116511124] DEBUG\n12:51:53 c.g.d.c.c.ExecStartResultCallback - STDOUT: Filesystem 1024-blocks Used Available Capacity Mounted on\n12:51:53 overlay 314561516 62506464 252055052 20% /\n12:51:53 tmpfs 65536 0 65536 0% /dev\n12:51:53 tmpfs 8132940 0 8132940 0% /sys/fs/cgroup\n12:51:53 shm 65536 0 65536 0% /dev/shm\n12:51:53 /dev/xvdg1 314561516 62506464 252055052 20% /etc/resolv.conf\n12:51:53 /dev/xvdg1 314561516 62506464 252055052 20% /etc/hostname\n12:51:53 /dev/xvdg1 314561516 62506464 252055052 20% /etc/hosts\n12:51:53 tmpfs 8132940 25132 8107808 0% /run/docker.sock\n12:51:53 tmpfs 8132940 0 8132940 0% /proc/acpi\n12:51:53 tmpfs 65536 0 65536 0% /proc/kcore\n12:51:53 tmpfs 65536 0 65536 0% /proc/keys\n12:51:53 tmpfs 65536 0 65536 0% /proc/timer_list\n12:51:53 tmpfs 65536 0 65536 0% /proc/timer_stats\n12:51:53 tmpfs 65536 0 65536 0% /proc/sched_debug\n12:51:53 tmpfs 8132940 0 8132940 0% /proc/scsi\n12:51:53 tmpfs 8132940 0 8132940 0% /sys/firmware\n12:51:53 [32m\xe2\x9c\x94 Docker environment should have more than 2GB free disk space[0m\n12:51:53 17 Mar 2020;17:51:41.690 [user:] [request:] [main] DEBUG\n12:51:53 c.g.d.core.command.AbstrDockerCmd - Cmd: ListImagesCmdImpl[imageNameFilter=<null>,showAll=false,filters=com.github.dockerjava.core.util.FiltersBuilder@0,execution=com.github.dockerjava.core.exec.ListImagesCmdExec@3ecd267f]\n12:51:53 [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.915 s <<< FAILURE! - in com.oranj.snowflake.account.VendorAccountTransactionSnowflakeConfigurationTest\n12:51:53 [ERROR] com.oranj.snowflake.account.VendorAccountTransactionSnowflakeConfigurationTest Time elapsed: 1.914 s <<< ERROR!\n12:51:53 org.testcontainers.containers.ContainerLaunchException: Container startup failed\n12:51:53 Caused by: org.testcontainers.containers.ContainerFetchException: Can't get Docker image: RemoteDockerImage(imageNameFuture=java.util.concurrent.CompletableFuture@37ddb69a[Completed normally], imagePullPolicy=DefaultPullPolicy(), dockerClient=LazyDockerClient.INSTANCE)\n12:51:53 Caused by: java.lang.IllegalStateException: Duplicate key ImageData(createdAt=1970-01-18T18:51:50.819Z)\n12:51:53 \nRun Code Online (Sandbox Code Playgroud)\n\n当 JVM 终止时,它似乎没有正确地自行清理。因此,当它再次启动时,它会尝试启动容器,但它已经看到那里已经有一个重复的容器。这是我多次重新运行测试的时候。我无法在本地 mac 操作系统上重现此内容。
\n\n环境:
\n\n| 归档时间: |
|
| 查看次数: |
20150 次 |
| 最近记录: |