File tree Expand file tree Collapse file tree 12 files changed +146
-0
lines changed
main/java/org/testcontainers/qdrant
java/org/testcontainers/qdrant Expand file tree Collapse file tree 12 files changed +146
-0
lines changed Original file line number Diff line number Diff line change 4747 - PostgreSQL
4848 - Presto
4949 - Pulsar
50+ - Qdrant
5051 - QuestDB
5152 - RabbitMQ
5253 - Redpanda
Original file line number Diff line number Diff line change 4747 - PostgreSQL
4848 - Presto
4949 - Pulsar
50+ - Qdrant
5051 - QuestDB
5152 - RabbitMQ
5253 - Redpanda
Original file line number Diff line number Diff line change 4545 - Oracle XE
4646 - OrientDB
4747 - PostgreSQL
48+ - Qdrant
4849 - QuestDB
4950 - Presto
5051 - Pulsar
Original file line number Diff line number Diff line change @@ -240,6 +240,11 @@ updates:
240240 schedule :
241241 interval : " weekly"
242242 open-pull-requests-limit : 10
243+ - package-ecosystem : " gradle"
244+ directory : " /modules/qdrant"
245+ schedule :
246+ interval : " weekly"
247+ open-pull-requests-limit : 10
243248 - package-ecosystem : " gradle"
244249 directory : " /modules/questdb"
245250 schedule :
Original file line number Diff line number Diff line change 152152 - changed-files :
153153 - any-glob-to-any-file :
154154 - modules/pulsar/**/*
155+ " modules/qdrant " :
156+ - changed-files :
157+ - any-glob-to-any-file :
158+ - modules/qdrant/**/*
155159" modules/questdb " :
156160 - changed-files :
157161 - any-glob-to-any-file :
Original file line number Diff line number Diff line change @@ -205,6 +205,9 @@ labels:
205205 - name : modules/pulsar
206206 color : ' #006b75'
207207
208+ - name : modules/qdrant
209+ color : ' #006b75'
210+
208211 - name : modules/questdb
209212 color : ' #006b75'
210213
Original file line number Diff line number Diff line change 1+ # Qdrant
2+
3+ Testcontainers module for [ Qdrant] ( https://registry.hub.docker.com/r/qdrant/qdrant )
4+
5+ ## Qdrant's usage examples
6+
7+ You can start a Qdrant container instance from any Java application by using:
8+
9+ <!-- codeinclude-->
10+ [ Default QDrant container] ( ../../modules/qdrant/src/test/java/org/testcontainers/qdrant/QdrantContainerTest.java ) inside_block: qdrantContainer
11+ <!-- /codeinclude-->
12+
13+ ## Adding this module to your project dependencies
14+
15+ Add the following dependency to your ` pom.xml ` /` build.gradle ` file:
16+
17+ === "Gradle"
18+ ```groovy
19+ testImplementation "org.testcontainers:qdrant:{{latest_version}}"
20+ ```
21+
22+ === "Maven"
23+ ```xml
24+ <dependency >
25+ <groupId >org.testcontainers</groupId >
26+ <artifactId >qdrant</artifactId >
27+ <version >{{latest_version}}</version >
28+ <scope >test</scope >
29+ </dependency >
30+ ```
Original file line number Diff line number Diff line change 8989 - modules/mockserver.md
9090 - modules/nginx.md
9191 - modules/pulsar.md
92+ - modules/qdrant.md
9293 - modules/rabbitmq.md
9394 - modules/redpanda.md
9495 - modules/solace.md
Original file line number Diff line number Diff line change 1+ description = " Testcontainers :: Qdrant"
2+
3+ dependencies {
4+ api project(' :testcontainers' )
5+
6+ testImplementation ' org.assertj:assertj-core:3.25.1'
7+ testImplementation ' io.qdrant:client:1.7.1'
8+ testImplementation platform(' io.grpc:grpc-bom:1.61.1' )
9+ testImplementation ' io.grpc:grpc-stub'
10+ testImplementation ' io.grpc:grpc-protobuf'
11+ testImplementation ' io.grpc:grpc-netty-shaded'
12+ }
Original file line number Diff line number Diff line change 1+ package org .testcontainers .qdrant ;
2+
3+ import org .testcontainers .containers .GenericContainer ;
4+ import org .testcontainers .containers .wait .strategy .Wait ;
5+ import org .testcontainers .utility .DockerImageName ;
6+
7+ /**
8+ * Testcontainers implementation for Qdrant.
9+ * <p>
10+ * Supported image: {@code qdrant/qdrant}
11+ * <p>
12+ * Exposed ports:
13+ * <ul>
14+ * <li>HTTP: 6333</li>
15+ * <li>Grpc: 6334</li>
16+ * </ul>
17+ */
18+ public class QdrantContainer extends GenericContainer <QdrantContainer > {
19+
20+ private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName .parse ("qdrant/qdrant" );
21+
22+ public QdrantContainer (String image ) {
23+ this (DockerImageName .parse (image ));
24+ }
25+
26+ public QdrantContainer (DockerImageName dockerImageName ) {
27+ super (dockerImageName );
28+ dockerImageName .assertCompatibleWith (DEFAULT_IMAGE_NAME );
29+ withExposedPorts (6333 , 6334 );
30+ waitingFor (Wait .forHttp ("/readyz" ).forPort (6333 ));
31+ }
32+
33+ public String getGrpcHostAddress () {
34+ return getHost () + ":" + getMappedPort (6334 );
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments