Search in sources :

Example 11 with AggregatedHttpRequest

use of com.linecorp.armeria.common.AggregatedHttpRequest in project zipkin by openzipkin.

the class ITEnsureIndexTemplate method setUpCatchAllTemplate.

/**
 * Create a "catch-all" index template with the lowest priority prior to running tests to ensure
 * that the index templates created during tests with higher priority function as designed. Only
 * applicable for ES >= 7.8
 */
void setUpCatchAllTemplate() throws IOException {
    AggregatedHttpRequest updateTemplate = AggregatedHttpRequest.of(RequestHeaders.of(PUT, catchAllIndexPath(), CONTENT_TYPE, JSON_UTF_8), HttpData.ofUtf8(catchAllTemplate()));
    Internal.instance.http(storage).newCall(updateTemplate, (parser, contentString) -> null, "update-template").execute();
}
Also used : HttpData(com.linecorp.armeria.common.HttpData) TestObjects.spanBuilder(zipkin2.TestObjects.spanBuilder) AggregatedHttpRequest(com.linecorp.armeria.common.AggregatedHttpRequest) RequestHeaders(com.linecorp.armeria.common.RequestHeaders) Span(zipkin2.Span) IOException(java.io.IOException) PUT(com.linecorp.armeria.common.HttpMethod.PUT) HttpMethod(com.linecorp.armeria.common.HttpMethod) TestInfo(org.junit.jupiter.api.TestInfo) DELETE(com.linecorp.armeria.common.HttpMethod.DELETE) ElasticsearchStorage(zipkin2.elasticsearch.ElasticsearchStorage) Test(org.junit.jupiter.api.Test) Internal(zipkin2.elasticsearch.internal.Internal) GET(com.linecorp.armeria.common.HttpMethod.GET) TestInstance(org.junit.jupiter.api.TestInstance) Arrays.asList(java.util.Arrays.asList) JSON_UTF_8(com.linecorp.armeria.common.MediaType.JSON_UTF_8) CONTENT_TYPE(com.linecorp.armeria.common.HttpHeaderNames.CONTENT_TYPE) StorageComponent(zipkin2.storage.StorageComponent) ITStorage(zipkin2.storage.ITStorage) AggregatedHttpRequest(com.linecorp.armeria.common.AggregatedHttpRequest)

Aggregations

AggregatedHttpRequest (com.linecorp.armeria.common.AggregatedHttpRequest)11 Test (org.junit.jupiter.api.Test)8 HttpData (com.linecorp.armeria.common.HttpData)3 CONTENT_TYPE (com.linecorp.armeria.common.HttpHeaderNames.CONTENT_TYPE)2 HttpMethod (com.linecorp.armeria.common.HttpMethod)2 DELETE (com.linecorp.armeria.common.HttpMethod.DELETE)2 GET (com.linecorp.armeria.common.HttpMethod.GET)2 PUT (com.linecorp.armeria.common.HttpMethod.PUT)2 JSON_UTF_8 (com.linecorp.armeria.common.MediaType.JSON_UTF_8)2 RequestHeaders (com.linecorp.armeria.common.RequestHeaders)2 IOException (java.io.IOException)2 Arrays.asList (java.util.Arrays.asList)2 TestInfo (org.junit.jupiter.api.TestInfo)2 TestInstance (org.junit.jupiter.api.TestInstance)2 Span (zipkin2.Span)2 TestObjects.spanBuilder (zipkin2.TestObjects.spanBuilder)2 ElasticsearchStorage (zipkin2.elasticsearch.ElasticsearchStorage)2 Internal (zipkin2.elasticsearch.internal.Internal)2 ITStorage (zipkin2.storage.ITStorage)2 StorageComponent (zipkin2.storage.StorageComponent)2