forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
http2_integration_test.h
33 lines (23 loc) · 1005 Bytes
/
http2_integration_test.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include "test/integration/http_integration.h"
#include "gtest/gtest.h"
namespace Envoy {
class Http2IntegrationTest : public HttpIntegrationTest,
public testing::TestWithParam<Network::Address::IpVersion> {
public:
Http2IntegrationTest()
: HttpIntegrationTest(Http::CodecClient::Type::HTTP2, GetParam(), realTime()) {}
void SetUp() override { setDownstreamProtocol(Http::CodecClient::Type::HTTP2); }
void simultaneousRequest(int32_t request1_bytes, int32_t request2_bytes);
};
class Http2RingHashIntegrationTest : public Http2IntegrationTest {
public:
Http2RingHashIntegrationTest();
~Http2RingHashIntegrationTest() override;
void createUpstreams() override;
void sendMultipleRequests(int request_bytes, Http::TestHeaderMapImpl headers,
std::function<void(IntegrationStreamDecoder&)> cb);
std::vector<FakeHttpConnectionPtr> fake_upstream_connections_;
int num_upstreams_ = 5;
};
} // namespace Envoy