Search in sources :

Example 1 with CONTENT_TYPE

use of com.linecorp.armeria.common.HttpHeaderNames.CONTENT_TYPE 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)1 HttpData (com.linecorp.armeria.common.HttpData)1 CONTENT_TYPE (com.linecorp.armeria.common.HttpHeaderNames.CONTENT_TYPE)1 HttpMethod (com.linecorp.armeria.common.HttpMethod)1 DELETE (com.linecorp.armeria.common.HttpMethod.DELETE)1 GET (com.linecorp.armeria.common.HttpMethod.GET)1 PUT (com.linecorp.armeria.common.HttpMethod.PUT)1 JSON_UTF_8 (com.linecorp.armeria.common.MediaType.JSON_UTF_8)1 RequestHeaders (com.linecorp.armeria.common.RequestHeaders)1 IOException (java.io.IOException)1 Arrays.asList (java.util.Arrays.asList)1 Test (org.junit.jupiter.api.Test)1 TestInfo (org.junit.jupiter.api.TestInfo)1 TestInstance (org.junit.jupiter.api.TestInstance)1 Span (zipkin2.Span)1 TestObjects.spanBuilder (zipkin2.TestObjects.spanBuilder)1 ElasticsearchStorage (zipkin2.elasticsearch.ElasticsearchStorage)1 Internal (zipkin2.elasticsearch.internal.Internal)1 ITStorage (zipkin2.storage.ITStorage)1 StorageComponent (zipkin2.storage.StorageComponent)1