| 577 | assert( (_A) == (_B) ); |
| 578 | |
| 579 | static void HttpStressThread(void* param) |
| 580 | { |
| 581 | char buf[128]; |
| 582 | int c = rand() % 3359; |
| 583 | HttpStressHelper* h = (HttpStressHelper*) param; |
| 584 | for (int i = 0; i < NUM_ITERATIONS; ++i) { |
| 585 | h->m_Content = ""; |
| 586 | dmSnPrintf(buf, sizeof(buf), "/add/%d/1000", i * c); |
| 587 | dmHttpClient::Result r; |
| 588 | r = dmHttpClient::Get(h->m_Client, buf); |
| 589 | T_ASSERT_EQ(dmHttpClient::RESULT_OK, r); |
| 590 | T_ASSERT_EQ(1000 + i * c, strtol(h->m_Content.c_str(), 0, 10)); |
| 591 | } |
| 592 | } |
| 593 | |
| 594 | TEST_P(dmHttpClientTest, ThreadStress) |
| 595 | { |
nothing calls this directly
no test coverage detected