[SERVER-20941] Update JS tests that have v8-specific code Created: 15/Oct/15  Updated: 17/Nov/15  Resolved: 13/Nov/15

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.2.0-rc3

Type: Task Priority: Major - P3
Reporter: Kamran K. Assignee: Kamran K.
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-21359 NULL pointer crash in MozJSImplScope:... Closed
related to SERVER-21360 JS tests in jstests/perf/ aren't runn... Closed
Backwards Compatibility: Fully Compatible
Sprint: TIG B (10/30/15), TIG C (11/20/15)
Participants:

 Description   

Some JS tests have v8-specific tests and/or comments. These tests should be updated:

concurrency/fsm_libs/worker_thread.js:                // the config object is serialized through BSON into the V8 isolate,
core/constructors.js:if (db.runCommand({buildinfo:1}).javascriptEngine == "V8") {
core/constructors.js:if (db.runCommand({buildinfo:1}).javascriptEngine == "V8") {
core/dbadmin.js:assert((jsEngine.startsWith("v8") || jsEngine == "none" || jsEngine.startsWith("mozjs")));
core/evald.js:// due to v8::TerminateExecution internals.
core/mr_bigobject.js:// v8 requires large start string, otherwise UTF16
core/numberint.js:// parsing: v8 evaluates not numbers to 0 which is not bad
core/or4.js:// v8 does not have a builtin Array.sort
core/rename.js:// note we use floats to make sure numbers are represented as doubles for both SM and v8, since test relies on record size
core/sorta.js:// Enable _allow_dot to try and bypass v8 field name checking.
libs/parallelTester.js:        // v8 doesn't like it if we exit before all threads are joined (SERVER-529)
noPassthroughWithMongod/mr_shard_version.js:        // TODO:  Deadlock due to global V8Lock between scopes if we stop with a js check
parallel/manyclients.js:// v8 uses about 30M (res) per thread, so can't do many more on an 8GB system
perf/v8_mapreduce.js:// Testing parallelism of mapReduce in V8
perf/v8_mapreduce.js:// Our server and client need to be running V8 and the host we are running on needs at least two
perf/v8_mapreduce.js:if (/V8/.test(interpreterVersion()) &&
perf/v8_mapreduce.js:    db.runCommand({buildinfo:1}).javascriptEngine == "V8" &&
perf/v8_mapreduce.js:    db.v8_parallel_mr_src.drop();
perf/v8_mapreduce.js:    for (j=0; j<100; j++) for (i=0; i<512; i++){ db.v8_parallel_mr_src.save({j:j, i:i})}
perf/v8_mapreduce.js:        var out = db.v8_parallel_mr_src.mapReduce(map, reduce, { out : "v8_parallel_mr_out" });
sharding/major_version_check.js:// This converter is needed as spidermonkey and v8 treat Timestamps slightly differently
slow2/mr_during_migrate.js:    // TODO:  Deadlock due to global V8Lock between scopes if we stop with a js check
slow2/mr_during_migrate.js:    // TODO:  If we pass in a weird value here, we can crash v8 obj parsing



 Comments   
Comment by Githook User [ 13/Nov/15 ]

Author:

{u'username': u'kkmongo', u'name': u'Kamran Khan', u'email': u'kamran.khan@mongodb.com'}

Message: SERVER-20941 Update v8-specific code and comments in JS tests

The switch to SpiderMonkey invalidated some of the code and comments.
Branch: master
https://github.com/mongodb/mongo/commit/15376bdb5345ed321baa7c456237e9439f8e7549

Generated at Thu Feb 08 03:55:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.