View Code? Open in Web Editor
NEW
TestContainer module for Confluent Platform (uses TC Kafka module)
Home Page: https://github.com/confluentinc/cp-docker-images
License: MIT License
testcontainers-java-module-confluent-platform's Introduction
TestContainers Module for Confluent Platform
Note
THIS LIBRARY IS DEPRICATED . CONSIDER USING christophschubert/cp-testcontainers
ALL FEATURES OF THIS PROJECT WILL BE AVAILABLE THERE. ALL FUTURE DEVELOPMENT WILL HAPPEN THERE AS WELL
Cirrus
Travis
Note
While library is 0.1-SNAPSHOT
binaries hosted in jitpack
project {
repositories {
maven { url ' https://jitpack.io' }
}
dependencies {
implementation ' com.github.gAmUssA:testcontainers-java-module-confluent-platform:master-SNAPSHOT'
}
}
Copyright (c) 2020 Viktor Gamov
testcontainers-java-module-confluent-platform's People
testcontainers-java-module-confluent-platform's Issues
Hi,
wanted to try out your module for incorporating Kafka in our Acceptance-Test stage but found out, that ConfluentKafkaContainer
class is package-private.
Not intended for public use yet? 😉
Hello,
When I run gradle test
, I get the following error. It was working until last week. I can't exactly pinpoint what is has happened recently other than the need to use DockerImageName
io .confluent .testcontainers .KsqlDbServerContainerTest > classMethod FAILED
org .testcontainers .containers .ContainerLaunchException : Container startup failed
at org .testcontainers .containers .GenericContainer .doStart (GenericContainer .java :330 )
at org .testcontainers .containers .KafkaContainer .doStart (KafkaContainer .java :102 )
at org .testcontainers .containers .GenericContainer .start (GenericContainer .java :311 )
at io .confluent .testcontainers .KsqlDbServerContainerTest .setUpClass (KsqlDbServerContainerTest .java :26 )
Caused by :
org .testcontainers .containers .ContainerFetchException : Can 't get Docker image: RemoteDockerImage(imageName=confluentinc/cp-kafka:5.5.1, imagePullPolicy=DefaultPullPolicy())
at org .testcontainers .containers .GenericContainer .getDockerImageName (GenericContainer .java :1279 )
at org .testcontainers .containers .GenericContainer .logger (GenericContainer .java :613 )
at org .testcontainers .containers .GenericContainer .doStart (GenericContainer .java :320 )
... 3 more
Caused by :
java .lang .IllegalStateException : Can not connect to Ryuk at localhost :32826
at org .testcontainers .utility .ResourceReaper .start (ResourceReaper .java :176 )
at org .testcontainers .DockerClientFactory .client (DockerClientFactory .java :168 )
at org .testcontainers .LazyDockerClient .getDockerClient (LazyDockerClient .java :14 )
at org .testcontainers .LazyDockerClient .inspectImageCmd (LazyDockerClient .java :12 )
at org .testcontainers .images .LocalImagesCache .refreshCache (LocalImagesCache .java :42 )
at org .testcontainers .images .AbstractImagePullPolicy .shouldPull (AbstractImagePullPolicy .java :24 )
at org .testcontainers .images .RemoteDockerImage .resolve (RemoteDockerImage .java :59 )
at org .testcontainers .images .RemoteDockerImage .resolve (RemoteDockerImage .java :26 )
at org .testcontainers .utility .LazyFuture .getResolvedValue (LazyFuture .java :20 )
at org .testcontainers .utility .LazyFuture .get (LazyFuture .java :27 )
at org .testcontainers .containers .GenericContainer .getDockerImageName (GenericContainer .java :1277 )
... 5 more
io .confluent .testcontainers .KafkaSingleNodeComposeTest > classMethod FAILED
java .lang .ExceptionInInitializerError
at sun .misc .Unsafe .ensureClassInitialized (Native Method )
at sun .reflect .UnsafeFieldAccessorFactory .newFieldAccessor (UnsafeFieldAccessorFactory .java :43 )
at sun .reflect .ReflectionFactory .newFieldAccessor (ReflectionFactory .java :156 )
at java .lang .reflect .Field .acquireFieldAccessor (Field .java :1088 )
at java .lang .reflect .Field .getFieldAccessor (Field .java :1069 )
at java .lang .reflect .Field .get (Field .java :393 )
at org .junit .runners .model .FrameworkField .get (FrameworkField .java :88 )
at org .junit .runners .model .TestClass .collectAnnotatedFieldValues (TestClass .java :249 )
at org .junit .runners .ParentRunner .classRules (ParentRunner .java :280 )
at org .junit .runners .ParentRunner .withClassRules (ParentRunner .java :268 )
at org .junit .runners .ParentRunner .classBlock (ParentRunner .java :217 )
at org .junit .runners .ParentRunner .run (ParentRunner .java :412 )
at org .gradle .api .internal .tasks .testing .junit .JUnitTestClassExecutor .runTestClass (JUnitTestClassExecutor .java :110 )
at org .gradle .api .internal .tasks .testing .junit .JUnitTestClassExecutor .execute (JUnitTestClassExecutor .java :58 )
at org .gradle .api .internal .tasks .testing .junit .JUnitTestClassExecutor .execute (JUnitTestClassExecutor .java :38 )
at org .gradle .api .internal .tasks .testing .junit .AbstractJUnitTestClassProcessor .processTestClass (AbstractJUnitTestClassProcessor .java :62 )
at org .gradle .api .internal .tasks .testing .SuiteTestClassProcessor .processTestClass (SuiteTestClassProcessor .java :51 )
at sun .reflect .NativeMethodAccessorImpl .invoke0 (Native Method )
at sun .reflect .NativeMethodAccessorImpl .invoke (NativeMethodAccessorImpl .java :62 )
at sun .reflect .DelegatingMethodAccessorImpl .invoke (DelegatingMethodAccessorImpl .java :43 )
at java .lang .reflect .Method .invoke (Method .java :498 )
at org .gradle .internal .dispatch .ReflectionDispatch .dispatch (ReflectionDispatch .java :36 )
at org .gradle .internal .dispatch .ReflectionDispatch .dispatch (ReflectionDispatch .java :24 )
at org .gradle .internal .dispatch .ContextClassLoaderDispatch .dispatch (ContextClassLoaderDispatch .java :33 )
at org .gradle .internal .dispatch .ProxyDispatchAdapter$DispatchingInvocationHandler .invoke (ProxyDispatchAdapter .java :94 )
at com .sun .proxy .$Proxy2 .processTestClass (Unknown Source )
at org .gradle .api .internal .tasks .testing .worker .TestWorker .processTestClass (TestWorker .java :119 )
at sun .reflect .NativeMethodAccessorImpl .invoke0 (Native Method )
at sun .reflect .NativeMethodAccessorImpl .invoke (NativeMethodAccessorImpl .java :62 )
at sun .reflect .DelegatingMethodAccessorImpl .invoke (DelegatingMethodAccessorImpl .java :43 )
at java .lang .reflect .Method .invoke (Method .java :498 )
at org .gradle .internal .dispatch .ReflectionDispatch .dispatch (ReflectionDispatch .java :36 )
at org .gradle .internal .dispatch .ReflectionDispatch .dispatch (ReflectionDispatch .java :24 )
at org .gradle .internal .remote .internal .hub .MessageHubBackedObjectConnection$DispatchWrapper .dispatch (MessageHubBackedObjectConnection .java :182 )
at org .gradle .internal .remote .internal .hub .MessageHubBackedObjectConnection$DispatchWrapper .dispatch (MessageHubBackedObjectConnection .java :164 )
at org .gradle .internal .remote .internal .hub .MessageHub$Handler .run (MessageHub .java :414 )
at org .gradle .internal .concurrent .ExecutorPolicy$CatchAndRecordFailures .onExecute (ExecutorPolicy .java :64 )
at org .gradle .internal .concurrent .ManagedExecutorImpl$1 .run (ManagedExecutorImpl .java :48 )
at java .util .concurrent .ThreadPoolExecutor .runWorker (ThreadPoolExecutor .java :1149 )
at java .util .concurrent .ThreadPoolExecutor$Worker .run (ThreadPoolExecutor .java :624 )
at org .gradle .internal .concurrent .ThreadFactoryImpl$ManagedThreadRunnable .run (ThreadFactoryImpl .java :56 )
at java .lang .Thread .run (Thread .java :748 )
Caused by :
java .lang .IllegalStateException : Can not connect to Ryuk at localhost :32827
at org .testcontainers .utility .ResourceReaper .start (ResourceReaper .java :176 )
at org .testcontainers .DockerClientFactory .client (DockerClientFactory .java :168 )
at org .testcontainers .containers .DockerComposeContainer .<init >(DockerComposeContainer .java :129 )
at org .testcontainers .containers .DockerComposeContainer .<init >(DockerComposeContainer .java :113 )
at org .testcontainers .containers .DockerComposeContainer .<init >(DockerComposeContainer .java :109 )
at io .confluent .testcontainers .KafkaSingleNodeComposeTest .<clinit >(KafkaSingleNodeComposeTest .java :18 )