feat: auto-flush stats timer, .env.json defaults, expose round-trip+timer tests
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <cstdio>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
@@ -91,6 +92,11 @@ int main() {
|
||||
assert(sc.Query(out, false, err));
|
||||
assert(out.find("GET") != std::string::npos && out.find("count=1") != std::string::npos);
|
||||
assert(sc.Query(out, true, err) && out.front() == '[');
|
||||
sc.StartAutoFlush(std::chrono::seconds(1));
|
||||
sc.Note("POST", 1024, 1024, 1000);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2500));
|
||||
sc.StopAutoFlush();
|
||||
assert(sc.Query(out, false, err) && out.find("POST") != std::string::npos);
|
||||
std::remove(db.c_str());
|
||||
}
|
||||
printf("expose_test PASS\n");
|
||||
|
||||
Reference in New Issue
Block a user