Browse Source

Fix lithium db test to use random number (#5741)

Joan Miquel 5 years ago
parent
commit
9dd0a31b6e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      frameworks/C++/lithium/lithium.cc

+ 1 - 1
frameworks/C++/lithium/lithium.cc

@@ -128,7 +128,7 @@ int main(int argc, char* argv[]) {
   };
   my_api.get("/db") = [&](http_request& request, http_response& response) {
     set_max_sql_connections_per_thread(db_nconn);
-    response.write_json(random_numbers.connect(request.fiber).find_one(s::id = 1234).value());
+    response.write_json(random_numbers.connect(request.fiber).find_one(s::id = 1 + rand() % 10000).value());
   };
 
   my_api.get("/queries") = [&](http_request& request, http_response& response) {