+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package org.apache.cassandra.sidecar;
import java.util.concurrent.CompletableFuture;
config = injector.getInstance(Configuration.class);
VertxTestContext context = new VertxTestContext();
- server.listen(config.getPort(), context.completing());
+ server.listen(config.getPort(), context.succeedingThenComplete());
context.awaitCompletion(5, SECONDS);
}
@Test
void testStreamRequestsThrottled() throws Exception
{
- String testRoute = "/keyspace/TestKeyspace/table/TestTable-54ea95ce-bba2-4e0a-a9be-e428e5d7160b/snapshot" +
+ String testRoute = "/keyspace/TestKeyspace/table/TestTable-54ea95ce-bba2-4e0a-a9be-e428e5d7160b/snapshots" +
"/TestSnapshot/component/TestKeyspace-TestTable-54ea95ce-bba2-4e0a-a9be-e428e5d7160b-Data.db";
for (int i = 0; i < 20; i++)
private void unblockingClientRequest(String route)
{
WebClient client = WebClient.create(vertx);
- client.get(config.getPort(), "localhost", "/api/v1/stream" + route)
+ client.get(config.getPort(), "localhost", "/api/v1" + route)
.as(BodyCodec.buffer())
.send(resp ->
{
{
WebClient client = WebClient.create(vertx);
CompletableFuture<HttpResponse> future = new CompletableFuture<>();
- client.get(config.getPort(), "localhost", "/api/v1/stream" + route)
+ client.get(config.getPort(), "localhost", "/api/v1" + route)
.as(BodyCodec.buffer())
.send(resp -> future.complete(resp.result()));
return future.get();