Skip to content
Snippets Groups Projects
Commit ca703b2b authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

Make llleap_test.cpp avoid hard limit on MSVC std::ostringstream max.

In load testing, we have observed intermittent failures on Windows in which
LLSDNotationStreamer into std::ostringstream seems to bump into a hard limit
of 1048590 bytes. ostringstream reports that much buffered data and returns
that much -- even though, on examination, the notation-serialized stream is
incomplete at that point. It's our intention to load-test LLLeap and
LLProcess, not the local iostream implementation; we hope that this kind of
data volume is comfortably greater than actual usage. Back off the
load-testing max size a bit.
parent 75f41254
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ StringVec sv(const StringVec& listof) { return listof; } ...@@ -40,7 +40,7 @@ StringVec sv(const StringVec& listof) { return listof; }
#define sleep(secs) _sleep((secs) * 1000) #define sleep(secs) _sleep((secs) * 1000)
#endif #endif
const size_t BUFFERED_LENGTH = 1024*1024; // try wrangling a megabyte of data const size_t BUFFERED_LENGTH = 1024*1023; // try wrangling just under a megabyte of data
void waitfor(const std::vector<LLLeap*>& instances, int timeout=60) void waitfor(const std::vector<LLLeap*>& instances, int timeout=60)
{ {
...@@ -139,13 +139,13 @@ namespace tut ...@@ -139,13 +139,13 @@ namespace tut
// dumping the entire packet wastes time and space. // dumping the entire packet wastes time and space.
// But if the error states a particular byte offset, // But if the error states a particular byte offset,
// truncate to (near) that offset when dumping data. // truncate to (near) that offset when dumping data.
" location = re.search(r' at byte ([0-9]+)', str(e))\n" " location = re.search(r' at (byte|index) ([0-9]+)', str(e))\n"
" if not location:\n" " if not location:\n"
" # didn't find offset, dump whole thing, no ellipsis\n" " # didn't find offset, dump whole thing, no ellipsis\n"
" ellipsis = ''\n" " ellipsis = ''\n"
" else:\n" " else:\n"
" # found offset within error message\n" " # found offset within error message\n"
" trunc = int(location.group(1)) + showmax\n" " trunc = int(location.group(2)) + showmax\n"
" data = data[:trunc]\n" " data = data[:trunc]\n"
" ellipsis = '... (%s more)' % (length - trunc)\n" " ellipsis = '... (%s more)' % (length - trunc)\n"
" offset = -showmax\n" " offset = -showmax\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment