mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-10 01:33:53 +00:00
Split SlowPost test
This commit is contained in:
parent
cc14855ba0
commit
d87082f04b
@ -2070,9 +2070,14 @@ TEST_F(ServerTest, SlowPost) {
|
|||||||
|
|
||||||
ASSERT_TRUE(res);
|
ASSERT_TRUE(res);
|
||||||
EXPECT_EQ(200, res->status);
|
EXPECT_EQ(200, res->status);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(ServerTest, SlowPostFail) {
|
||||||
|
char buffer[64 * 1024];
|
||||||
|
memset(buffer, 0x42, sizeof(buffer));
|
||||||
|
|
||||||
cli_.set_write_timeout(0, 0);
|
cli_.set_write_timeout(0, 0);
|
||||||
res = cli_.Post(
|
auto res = cli_.Post(
|
||||||
"/slowpost", 64 * 1024 * 1024,
|
"/slowpost", 64 * 1024 * 1024,
|
||||||
[&](size_t /*offset*/, size_t /*length*/, DataSink &sink) {
|
[&](size_t /*offset*/, size_t /*length*/, DataSink &sink) {
|
||||||
sink.write(buffer, sizeof(buffer));
|
sink.write(buffer, sizeof(buffer));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user