Repository: strimzi/strimzi-kafka-bridge
Pull request #934 (2024-10-22 08:04:05)

Bump test container to 0.108.0
This PR updates a recently released version of the test container (i.e., 0.108.0).

ppatierno: @see-quick I see stuff keep failing during the build (on Travis CI as well), can you take a look please?
ppatierno: It seems that it's failing at the same point with this error:

```java
ProducerIT>HttpBridgeITAbstract.cleanUp:165 » Execution org.apache.kafka.common.errors.UnknownTopicOrPartitionException: This server does not host this topic-partition.
```
and only with Java 11 on both Travis CI and Azure pipeline.
see-quick: Yeah, I will take a look on that tomorrow.

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index df8d0d7..37463d7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,8 @@
 
 ## 0.31.0
 
-* Dependency updates (Vert.x 4.5.10)
+* Dependency updates (Kafka 3.9.0, Vert.x 4.5.11, Netty 4.1.115.Final)
+* Added support for creating a new topic via endpoint.
 
 ## 0.30.0
 
diff --git a/documentation/book/api/.openapi-generator/openapi.json-generate-apidoc.sha256 b/documentation/book/api/.openapi-generator/openapi.json-generate-apidoc.sha256
index ec32758..f0bdd7e 100644
--- a/documentation/book/api/.openapi-generator/openapi.json-generate-apidoc.sha256
+++ b/documentation/book/api/.openapi-generator/openapi.json-generate-apidoc.sha256
@@ -1,1 +1,1 @@
-e4a70d99cdac5e8dddb45ce30c39817fa9402463074478e0fd3a05d6a7f849d5
\ No newline at end of file
+cf88d8909114896517ba4027596382126bca594d55dd9a924330232407e603b2
\ No newline at end of file
diff --git a/documentation/book/api/index.adoc b/documentation/book/api/index.adoc
index 8f053f1..af76517 100644
--- a/documentation/book/api/index.adoc
+++ b/documentation/book/api/index.adoc
@@ -2289,6 +2289,87 @@ endif::internal-generation[]
 === Topics
 
 
+[.createTopic]
+==== createTopic
+
+`POST /admin/topics`
+
+
+
+===== Description
+
+Creates a topic with given name, partitions count, and replication factor.
+
+
+// markup not found, no include::{specDir}admin/topics/POST/spec.adoc[opts=optional]
+
+
+
+===== Parameters
+
+
+
+[cols="2,3,1,1,1"]
+.Body Parameter
+|===
+|Name| Description| Required| Default| Pattern
+
+| NewTopic
+| Creates a topic with given name, partitions count, and replication factor. <<NewTopic>>
+| X
+| 
+| 
+
+|===
+
+
+
+
+
+===== Return Type
+
+
+
+
+-
+
+
+===== Responses
+
+.HTTP Response Codes
+[cols="2,3,1"]
+|===
+| Code | Message | Datatype
+
+
+| 201
+| Created
+|  <<>>
+
+|===
+
+===== Samples
+
+
+include::{snippetDir}admin/topics/POST/http-request.adoc[opts=optional]
+
+
+// markup not found, no include::{snippetDir}admin/topics/POST/http-response.adoc[opts=optional]
+
+
+
+// file not found, no * wiremock data link :admin/topics/POST/POST.json[]
+
+
+ifdef::internal-generation[]
+===== Implementation
+
+// markup not found, no include::{specDir}admin/topics/POST/implementation.adoc[opts=optional]
+
+
+endif::internal-generation[]
+
+
 [.getOffsets]
 ==== getOffsets
 
@@ -3209,6 +3290,42 @@ Information about Kafka Bridge instance.
 
 
 
+[#NewTopic]
+=== _NewTopic_ NewTopic
+
+
+
+
+[.fields-NewTopic]
+[cols="2,1,1,2,4,1"]
+|===
+| Field Name| Required| Nullable | Type| Description | Format
+
+| topic_name
+| X
+| 
+|   String  
+| Name of the topic to create.
+|     
+
+| partitions_count
+| 
+| X
+|   Integer  
+| Number of partitions for the topic.
+|     
+
+| replication_factor
+| 
+| X
+|   Integer  
+| Number of replicas for each partition.
+|     
+
+|===
+
+
+
 [#OffsetCommitSeek]
 === _OffsetCommitSeek_ OffsetCommitSeek
 
diff --git a/documentation/book/api/snippet/admin/topics/POST/http-request.adoc b/documentation/book/api/snippet/admin/topics/POST/http-request.adoc
new file mode 100644
index 0000000..43e8dfb
--- /dev/null
+++ b/documentation/book/api/snippet/admin/topics/POST/http-request.adoc
@@ -0,0 +1,11 @@
+==== Example HTTP request
+
+===== Request body
+[source,json]
+----
+{
+  "topic_name" : "my-topic",
+  "partitions_count" : 1,
+  "replication_factor" : 2,
+}
+----
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index c247f29..36ae84b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -100,10 +100,10 @@
 		<maven.compiler.source>11</maven.compiler.source>
 		<maven.compiler.target>11</maven.compiler.target>
 		<log4j.version>2.17.2</log4j.version>
-		<vertx.version>4.5.10</vertx.version>
-		<vertx-testing.version>4.5.10</vertx-testing.version>
-		<netty.version>4.1.111.Final</netty.version>
-		<kafka.version>3.8.0</kafka.version>
+		<vertx.version>4.5.11</vertx.version>
+		<vertx-testing.version>4.5.11</vertx-testing.version>
+		<netty.version>4.1.115.Final</netty.version>
+		<kafka.version>3.9.0</kafka.version>
 		<kafka-kubernetes-config-provider.version>1.2.0</kafka-kubernetes-config-provider.version>
 		<kafka-env-var-config-provider.version>1.1.0</kafka-env-var-config-provider.version>
 		<maven.checkstyle.version>3.3.0</maven.checkstyle.version>
@@ -135,7 +135,7 @@
 		<jmx-prometheus-collector.version>1.0.1</jmx-prometheus-collector.version>
 		<prometheus-client.version>1.3.1</prometheus-client.version>
 		<commons-cli.version>1.4</commons-cli.version>
-		<test-container.version>0.107.0</test-container.version>
+		<test-container.version>0.108.0</test-container.version>
 		<jakarta.version>2.3.2</jakarta.version>
 		<snakeyaml.version>2.2</snakeyaml.version>
 		<guava.version>32.1.3-jre</guava.version>
diff --git a/src/main/java/io/strimzi/kafka/bridge/KafkaBridgeAdmin.java b/src/main/java/io/strimzi/kafka/bridge/KafkaBridgeAdmin.java
index 51f7d27..4947c63 100644
--- a/src/main/java/io/strimzi/kafka/bridge/KafkaBridgeAdmin.java
+++ b/src/main/java/io/strimzi/kafka/bridge/KafkaBridgeAdmin.java
@@ -9,6 +9,7 @@ import io.strimzi.kafka.bridge.config.KafkaConfig;
 import org.apache.kafka.clients.admin.AdminClient;
 import org.apache.kafka.clients.admin.Config;
 import org.apache.kafka.clients.admin.ListOffsetsResult;
+import org.apache.kafka.clients.admin.NewTopic;
 import org.apache.kafka.clients.admin.OffsetSpec;
 import org.apache.kafka.clients.admin.TopicDescription;
 import org.apache.kafka.common.TopicPartition;
@@ -16,8 +17,10 @@ import org.apache.kafka.common.config.ConfigResource;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 import java.util.Properties;
 import java.util.Set;
 import java.util.concurrent.CompletableFuture;
@@ -84,6 +87,31 @@ public class KafkaBridgeAdmin {
         return promise;
     }
 
+    /**
+     * Creates a topic with given name and number of partitions (optional) and replication factor (optional).
+     *
+     * @param topicName topic name to create
+     * @param partitions number of partitions
+     * @param replicationFactor replication factor
+     * @return a CompletionStage Void
+     */
+    public CompletionStage<Void> createTopic(String topicName, Optional<Integer> partitions, Optional<Short> replicationFactor) {
+        LOGGER.trace("Create topic thread {}", Thread.currentThread());
+        LOGGER.info("Create topic {}, partitions {}, replicationFactor {}", topicName, partitions, replicationFactor);
+        CompletableFuture<Void> promise = new CompletableFuture<>();
+        this.adminClient.createTopics(Collections.singletonList(new NewTopic(topicName, partitions, replicationFactor)))
+                .all()
+                .whenComplete((topic, exception) -> {
+                    LOGGER.trace("Create topic callback thread {}", Thread.currentThread());
+                    if (exception == null) {
+                        promise.complete(topic);
+                    } else {
+                        promise.completeExceptionally(exception);
+                    }
+                });
+        return promise;
+    }
+
     /**
      * Returns the description of the specified topics.
      *
diff --git a/src/main/java/io/strimzi/kafka/bridge/http/HttpAdminBridgeEndpoint.java b/src/main/java/io/strimzi/kafka/bridge/http/HttpAdminBridgeEndpoint.java
index 033be8a..8719c5c 100644
--- a/src/main/java/io/strimzi/kafka/bridge/http/HttpAdminBridgeEndpoint.java
+++ b/src/main/java/io/strimzi/kafka/bridge/http/HttpAdminBridgeEndpoint.java
@@ -15,6 +15,7 @@ import io.strimzi.kafka.bridge.KafkaBridgeAdmin;
 import io.strimzi.kafka.bridge.config.BridgeConfig;
 import io.strimzi.kafka.bridge.http.converter.JsonUtils;
 import io.strimzi.kafka.bridge.http.model.HttpBridgeError;
+import io.vertx.core.json.JsonObject;
 import io.vertx.ext.web.RoutingContext;
 import org.apache.kafka.clients.admin.Config;
 import org.apache.kafka.clients.admin.ConfigEntry;
@@ -32,6 +33,7 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 import java.util.Set;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.CompletionStage;
@@ -81,6 +83,10 @@ public class HttpAdminBridgeEndpoint extends HttpBridgeEndpoint {
                 doGetTopic(routingContext);
                 break;
 
+            case CREATE_TOPIC:
+                doCreateTopic(routingContext);
+                break;
+
             case LIST_PARTITIONS:
                 doListPartitions(routingContext);
                 break;
@@ -173,6 +179,47 @@ public class HttpAdminBridgeEndpoint extends HttpBridgeEndpoint {
                 });
     }
 
+    /**
+     * Create a topic with described name, partitions count, and replication factor in the body of the HTTP request
+     *
+     * @param routingContext the routing context
+     */
+    public void doCreateTopic(RoutingContext routingContext) {
+        JsonObject jsonBody = routingContext.body().asJsonObject();
+
+        if (jsonBody.isEmpty()) {
+            HttpBridgeError error = new HttpBridgeError(
+                    HttpResponseStatus.UNPROCESSABLE_ENTITY.code(),
+                    "Request body must be a JSON object"
+            );
+            HttpUtils.sendResponse(routingContext, HttpResponseStatus.UNPROCESSABLE_ENTITY.code(),
+                    BridgeContentType.KAFKA_JSON, JsonUtils.jsonToBytes(error.toJson()));
+            return;
+        }
+
+        String topicName = jsonBody.getString("topic_name");
+        Optional<Integer> partitionsCount = Optional.ofNullable(jsonBody.getInteger("partitions_count"));
+        Optional<Short> replicationFactor = Optional.ofNullable(jsonBody.getInteger("replication_factor"))
+                .map(Integer::shortValue);
+
+        this.kafkaBridgeAdmin.createTopic(topicName, partitionsCount, replicationFactor)
+                .whenComplete(((topic, exception) -> {
+                    LOGGER.trace("Create topic handler thread {}", Thread.currentThread());
+                    if (exception == null) {
+                        JsonNode root = JsonUtils.createObjectNode();
+                        HttpUtils.sendResponse(routingContext, HttpResponseStatus.CREATED.code(),
+                                BridgeContentType.KAFKA_JSON, JsonUtils.jsonToBytes(root));
+                    } else {
+                        HttpBridgeError error = new HttpBridgeError(
+                                HttpResponseStatus.INTERNAL_SERVER_ERROR.code(),
+                                exception.getMessage()
+                        );
+                        HttpUtils.sendResponse(routingContext, HttpResponseStatus.INTERNAL_SERVER_ERROR.code(),
+                                BridgeContentType.KAFKA_JSON, JsonUtils.jsonToBytes(error.toJson()));
+                    }
+                }));
+    }
+
     /**
      * Get partitions information related to the topic in the HTTP request
      *
diff --git a/src/main/java/io/strimzi/kafka/bridge/http/HttpBridge.java b/src/main/java/io/strimzi/kafka/bridge/http/HttpBridge.java
index af2fc24..5c4747e 100644
--- a/src/main/java/io/strimzi/kafka/bridge/http/HttpBridge.java
+++ b/src/main/java/io/strimzi/kafka/bridge/http/HttpBridge.java
@@ -157,6 +157,7 @@ public class HttpBridge extends AbstractVerticle {
                 routerBuilder.operation(this.SEEK_TO_END.getOperationId().toString()).handler(this.SEEK_TO_END);
                 routerBuilder.operation(this.LIST_TOPICS.getOperationId().toString()).handler(this.LIST_TOPICS);
                 routerBuilder.operation(this.GET_TOPIC.getOperationId().toString()).handler(this.GET_TOPIC);
+                routerBuilder.operation(this.CREATE_TOPIC.getOperationId().toString()).handler(this.CREATE_TOPIC);
                 routerBuilder.operation(this.LIST_PARTITIONS.getOperationId().toString()).handler(this.LIST_PARTITIONS);
                 routerBuilder.operation(this.GET_PARTITION.getOperationId().toString()).handler(this.GET_PARTITION);
                 routerBuilder.operation(this.GET_OFFSETS.getOperationId().toString()).handler(this.GET_OFFSETS);
@@ -381,6 +382,11 @@ public class HttpBridge extends AbstractVerticle {
         processAdminClient(routingContext);
     }
 
+    private void createTopic(RoutingContext routingContext) {
+        this.httpBridgeContext.setOpenApiOperation(HttpOpenApiOperations.CREATE_TOPIC);
+        processAdminClient(routingContext);
+    }
+
     private void listPartitions(RoutingContext routingContext) {
         this.httpBridgeContext.setOpenApiOperation(HttpOpenApiOperations.LIST_PARTITIONS);
         processAdminClient(routingContext);
@@ -726,6 +732,14 @@ public class HttpBridge extends AbstractVerticle {
         }
     };
 
+    final HttpOpenApiOperation CREATE_TOPIC = new HttpOpenApiOperation(HttpOpenApiOperations.CREATE_TOPIC) {
+
+        @Override
+        public void process(RoutingContext routingContext) {
+            createTopic(routingContext);
+        }
+    };
+
     final HttpOpenApiOperation LIST_PARTITIONS = new HttpOpenApiOperation(HttpOpenApiOperations.LIST_PARTITIONS) {
 
         @Override
diff --git a/src/main/java/io/strimzi/kafka/bridge/http/HttpOpenApiOperations.java b/src/main/java/io/strimzi/kafka/bridge/http/HttpOpenApiOperations.java
index eef4482..869c945 100644
--- a/src/main/java/io/strimzi/kafka/bridge/http/HttpOpenApiOperations.java
+++ b/src/main/java/io/strimzi/kafka/bridge/http/HttpOpenApiOperations.java
@@ -28,6 +28,8 @@ public enum HttpOpenApiOperations {
     LIST_TOPICS("listTopics"),
     /** get information for a specific topic */
     GET_TOPIC("getTopic"),
+    /** creates a topic with specified name */
+    CREATE_TOPIC("createTopic"),
     /** list partitions for a specific topic */
     LIST_PARTITIONS("listPartitions"),
     /** get partition information for a specific topic */
diff --git a/src/main/resources/openapi.json b/src/main/resources/openapi.json
index 504a2e8..e14b1a4 100644
--- a/src/main/resources/openapi.json
+++ b/src/main/resources/openapi.json
@@ -753,6 +753,31 @@
                 }
             ]
         },
+        "/admin/topics": {
+            "post": {
+                "tags": [
+                    "Topics"
+                ],
+                "description": "Creates a topic with given name, partitions count, and replication factor.",
+                "operationId": "createTopic",
+                "requestBody": {
+                    "description": "Creates a topic with given name, partitions count, and replication factor.",
+                    "content": {
+                        "application/vnd.kafka.json.v2+json": {
+                            "schema": {
+                                "$ref": "#/components/schemas/NewTopic"
+                            }
+                        }
+                    },
+                    "required": true
+                },
+                "responses": {
+                    "201": {
+                        "description": "Created"
+                    }
+                }
+            }
+        },
         "/consumers/{groupid}/instances/{name}/records": {
             "get": {
                 "tags": [
@@ -2193,6 +2218,33 @@
                     }
                 ],
                 "nullable" : true
+            },
+            "NewTopic": {
+                "title": "NewTopic",
+                "type": "object",
+                "properties": {
+                    "topic_name": {
+                        "description": "Name of the topic to create.",
+                        "type": "string"
+                    },
+                    "partitions_count": {
+                        "description": "Number of partitions for the topic.",
+                        "type": "integer",
+                        "nullable": true
+                    },
+                    "replication_factor": {
+                        "description": "Number of replicas for each partition.",
+                        "type": "integer",
+                        "nullable": true
+                    }
+                },
+                "required": ["topic_name"],
+                "additionalProperties": false,
+                "example": {
+                    "topic_name": "my-topic",
+                    "partitions_count": 3,
+                    "replication_factor": 2
+                }
             }
         }
     },
diff --git a/src/main/resources/openapiv2.json b/src/main/resources/openapiv2.json
index a5e4eab..e9d59a0 100644
--- a/src/main/resources/openapiv2.json
+++ b/src/main/resources/openapiv2.json
@@ -686,6 +686,36 @@
         }
       ]
     },
+    "/admin/topics": {
+      "post": {
+        "tags": [
+          "Topics"
+        ],
+        "description": "Creates a topic with given name, partitions count, and replication factor.",
+        "operationId": "createTopic",
+        "consumes": [
+          "application/vnd.kafka.v2+json"
+        ],
+        "produces": [
+          "application/vnd.kafka.v2+json"
+        ],
+        "parameters": [
+          {
+            "name": "body",
+            "in": "body",
+            "required": true,
+            "schema": {
+              "$ref": "#/definitions/NewTopic"
+            }
+          }
+        ],
+        "responses": {
+          "201": {
+            "description": "Created"
+          }
+        }
+      }
+    },
     "/consumers/{groupid}/instances/{name}/records": {
       "get": {
         "tags": [
@@ -2027,6 +2057,31 @@
         "string",
         "null"
       ]
+    },
+    "NewTopic": {
+      "title": "NewTopic",
+      "type": "object",
+      "properties": {
+        "topic_name": {
+          "description": "Name of the topic to create.",
+          "type": "string"
+        },
+        "partitions_count": {
+          "description": "Number of partitions for the topic.",
+          "type": "integer"
+        },
+        "replication_factor": {
+          "description": "Number of replicas for each partition.",
+          "type": "integer"
+        }
+      },
+      "required": ["topic_name"],
+      "additionalProperties": false,
+      "example": {
+        "topic_name": "my-topic",
+        "partitions_count": 3,
+        "replication_factor": 2
+      }
     }
   },
   "tags": [


Test patch:
diff --git a/src/test/java/io/strimzi/kafka/bridge/http/AdminClientIT.java b/src/test/java/io/strimzi/kafka/bridge/http/AdminClientIT.java
index df6cdd7..bc8ae7e 100644
--- a/src/test/java/io/strimzi/kafka/bridge/http/AdminClientIT.java
+++ b/src/test/java/io/strimzi/kafka/bridge/http/AdminClientIT.java
@@ -215,4 +215,62 @@ public class AdminClientIT extends HttpBridgeITAbstract {
                 });
         producer.get(TEST_TIMEOUT, TimeUnit.SECONDS);
     }
+
+    @Test
+    void createTopicBlankBodyTest(VertxTestContext context) {
+        JsonObject jsonObject = new JsonObject();
+
+        // create topic test without name, partitions and replication factor
+        baseService()
+                .postRequest("/admin/topics")
+                .as(BodyCodec.jsonObject())
+                .sendJsonObject(jsonObject, ar -> {
+                    context.verify(() -> {
+                        assertThat(ar.succeeded(), is(true));
+                        HttpResponse<JsonObject> response = ar.result();
+                        assertThat(response.statusCode(), is(HttpResponseStatus.BAD_REQUEST.code()));
+                    });
+                    context.completeNow();
+                });
+    }
+
+    @Test
+    void createTopicTest(VertxTestContext context) {
+        JsonObject jsonObject = new JsonObject();
+
+        // create topic test without partitions and replication factor
+        jsonObject.put("topic_name", topic);
+        baseService()
+                .postRequest("/admin/topics")
+                .as(BodyCodec.jsonObject())
+                .sendJsonObject(jsonObject, ar -> {
+                    context.verify(() -> {
+                        assertThat(ar.succeeded(), is(true));
+                        HttpResponse<JsonObject> response = ar.result();
+                        assertThat(response.statusCode(), is(HttpResponseStatus.CREATED.code()));
+                    });
+                    context.completeNow();
+                });
+    }
+
+    @Test
+    void createTopicAllParametersTest(VertxTestContext context) {
+        JsonObject jsonObject = new JsonObject();
+
+        // create topic test with 1 partition and 1 replication factor
+        jsonObject.put("topic_name", topic);
+        jsonObject.put("partitions_count", 1);
+        jsonObject.put("replication_factor", 1);
+        baseService()
+                .postRequest("/admin/topics")
+                .as(BodyCodec.jsonObject())
+                .sendJsonObject(jsonObject, ar -> {
+                    context.verify(() -> {
+                        assertThat(ar.succeeded(), is(true));
+                        HttpResponse<JsonObject> response = ar.result();
+                        assertThat(response.statusCode(), is(HttpResponseStatus.CREATED.code()));
+                    });
+                    context.completeNow();
+                });
+    }
 }
diff --git a/src/test/java/io/strimzi/kafka/bridge/http/ConsumerGeneratedNameIT.java b/src/test/java/io/strimzi/kafka/bridge/http/ConsumerGeneratedNameIT.java
index aa684dd..cd48f7f 100644
--- a/src/test/java/io/strimzi/kafka/bridge/http/ConsumerGeneratedNameIT.java
+++ b/src/test/java/io/strimzi/kafka/bridge/http/ConsumerGeneratedNameIT.java
@@ -58,7 +58,8 @@ public class ConsumerGeneratedNameIT {
 
     static {
         if ("FALSE".equals(KAFKA_EXTERNAL_ENV)) {
-            kafkaContainer = new StrimziKafkaContainer();
+            kafkaContainer = new StrimziKafkaContainer()
+                .waitForRunning();
             kafkaContainer.start();
             kafkaUri = kafkaContainer.getBootstrapServers();
         } else {
diff --git a/src/test/java/io/strimzi/kafka/bridge/http/HttpCorsIT.java b/src/test/java/io/strimzi/kafka/bridge/http/HttpCorsIT.java
index 9cb192c..b6c3f6b 100644
--- a/src/test/java/io/strimzi/kafka/bridge/http/HttpCorsIT.java
+++ b/src/test/java/io/strimzi/kafka/bridge/http/HttpCorsIT.java
@@ -64,7 +64,8 @@ public class HttpCorsIT {
 
     static {
         if ("FALSE".equals(KAFKA_EXTERNAL_ENV)) {
-            kafkaContainer = new StrimziKafkaContainer();
+            kafkaContainer = new StrimziKafkaContainer()
+                .waitForRunning();
             kafkaContainer.start();
 
             kafkaUri = kafkaContainer.getBootstrapServers();
diff --git a/src/test/java/io/strimzi/kafka/bridge/http/OtherServicesIT.java b/src/test/java/io/strimzi/kafka/bridge/http/OtherServicesIT.java
index 7586ea7..1237f7a 100644
--- a/src/test/java/io/strimzi/kafka/bridge/http/OtherServicesIT.java
+++ b/src/test/java/io/strimzi/kafka/bridge/http/OtherServicesIT.java
@@ -151,6 +151,8 @@ public class OtherServicesIT extends HttpBridgeITAbstract {
                         assertThat(paths.containsKey("/topics/{topicname}/partitions/{partitionid}/offsets"), is(true));
                         assertThat(paths.containsKey("/topics/{topicname}/partitions"), is(true));
                         assertThat(bridgeResponse.getJsonObject("paths").getJsonObject("/topics/{topicname}/partitions/{partitionid}").getJsonObject("post").getString("operationId"), is(HttpOpenApiOperations.SEND_TO_PARTITION.toString()));
+                        assertThat(paths.containsKey("/admin/topics"), is(true));
+                        assertThat(bridgeResponse.getJsonObject("paths").getJsonObject("/admin/topics").getJsonObject("post").getString("operationId"), is(HttpOpenApiOperations.CREATE_TOPIC.toString()));
                         assertThat(paths.containsKey("/healthy"), is(true));
                         assertThat(bridgeResponse.getJsonObject("paths").getJsonObject("/healthy").getJsonObject("get").getString("operationId"), is(HttpOpenApiOperations.HEALTHY.toString()));
                         assertThat(paths.containsKey("/ready"), is(true));
@@ -160,7 +162,7 @@ public class OtherServicesIT extends HttpBridgeITAbstract {
                         assertThat(paths.containsKey("/"), is(true));
                         assertThat(bridgeResponse.getJsonObject("paths").getJsonObject("/").getJsonObject("get").getString("operationId"), is(HttpOpenApiOperations.INFO.toString()));
                         assertThat(paths.containsKey("/karel"), is(false));
-                        assertThat(bridgeResponse.getJsonObject("definitions").getMap().size(), is(27));
+                        assertThat(bridgeResponse.getJsonObject("definitions").getMap().size(), is(28));
                         assertThat(bridgeResponse.getJsonArray("tags").size(), is(4));
                     });
                     context.completeNow();
diff --git a/src/test/java/io/strimzi/kafka/bridge/http/base/HttpBridgeITAbstract.java b/src/test/java/io/strimzi/kafka/bridge/http/base/HttpBridgeITAbstract.java
index 03e2a9c..8926f01 100644
--- a/src/test/java/io/strimzi/kafka/bridge/http/base/HttpBridgeITAbstract.java
+++ b/src/test/java/io/strimzi/kafka/bridge/http/base/HttpBridgeITAbstract.java
@@ -71,7 +71,8 @@ public abstract class HttpBridgeITAbstract {
 
     static {
         if ("FALSE".equals(KAFKA_EXTERNAL_ENV)) {
-            kafkaContainer = new StrimziKafkaContainer();
+            kafkaContainer = new StrimziKafkaContainer()
+                .waitForRunning();
             kafkaContainer.start();
 
             kafkaUri = kafkaContainer.getBootstrapServers();