When using the shell from todays master and "introspecting" the aggregation helper (leaving out the parenthesis) exposes a weird looking comment that feels creepy.
> db.messages.aggregate
function (pipeline, extraOpts) {
var cmd = {pipeline: pipeline};
....
if (TestData && !('batchSize' in cmd.cursor)) {
// If we are running in a test, set batchsize to 0 to make sure it works across a GetMore
cmd.cursor.batchSize = 0;
}
....
}
Exposing normal users to this comment, and global variable test (who knows, maybe the user is using that variable for his own tests), feels very wrong and dirty.