Core tests failing due to undefined variable

19 views
Skip to first unread message

Guilherme

unread,
Nov 20, 2019, 6:01:18 PM11/20/19
to mongodb-dev
Hello all,

First of all, I am not so sure if this is the right place to ask this question. If it is not, just point me the right direction.

I am trying to execute the core suite of tests but some of them are failing with an exception TestData is undefined. Is this the expected behavior? If not, what is the correct way to execute those tests?

$ mongo jstests/core/comment_field.js
MongoDB shell version v4.2.0
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("c0df7048-e4af-4464-b30a-50eaf48618c3") }
MongoDB server version: 4.2.0
2019-11-20T19:51:34.415-0300 E  QUERY    [js] uncaught exception: TypeError: TestData is undefined :
@jstests/core/comment_field.js:16:1
@jstests/core/comment_field.js:9:2
2019-11-20T19:51:34.415-0300 F  -        [main] failed to load: jstests/core/comment_field.js
2019-11-20T19:51:34.415-0300 E  -        [main] exiting with code -3

Kind Regards

Mark Benvenuto

unread,
Nov 20, 2019, 7:03:14 PM11/20/19
to mongo...@googlegroups.com
Some of the tests do depend on TestData which is normally created by the test harness buildscripts/resmoke.py. Resmoke creates the TestData object with --eval command line to the mongo shell before running the test. You will see an example of this in the output from resmoke.

To run this test, use the following command line:
python3 buildscripts\resmoke.py --suite=core .\jstests\core\comment_field.js


Mark


--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-dev/6b00741b-31df-43cd-99eb-5ff7f315bda3%40googlegroups.com.

Guilherme

unread,
Nov 20, 2019, 7:24:52 PM11/20/19
to mongodb-dev
Hi Mark, thanks for the answer.

I have tried to run this test with resmoke.py but it is still failing. I put the result on pastebin so that you can take a look.

Regards

Mark Benvenuto

unread,
Nov 20, 2019, 8:21:05 PM11/20/19
to mongo...@googlegroups.com
You are running a test from our master branch against an old version of the server. This mismatch is causing the error since this commit (https://github.com/mongodb/mongo/commit/60518c8920064b30df53129ea880dacfcb04be71) added a new command which is not part of the 4.2.x. release line.

From you test logs, I can see that the test server you are running is 4.2.0. The test is designed to be run against a server built from master.

You either need to build the server from source (see https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source) or use the tests from 4.2.0 tag (git checkout r4.2.0 to checkout that branch).

mark

--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-dev...@googlegroups.com.

Guilherme

unread,
Nov 20, 2019, 8:32:51 PM11/20/19
to mongodb-dev
Thanks for the help, Mark.

I will use the tests from tag 4.2.0.

Regards,

Guilherme

On Wednesday, November 20, 2019 at 10:21:05 PM UTC-3, Mark Benvenuto wrote:
You are running a test from our master branch against an old version of the server. This mismatch is causing the error since this commit (https://github.com/mongodb/mongo/commit/60518c8920064b30df53129ea880dacfcb04be71) added a new command which is not part of the 4.2.x. release line.

From you test logs, I can see that the test server you are running is 4.2.0. The test is designed to be run against a server built from master.

You either need to build the server from source (see https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source) or use the tests from 4.2.0 tag (git checkout r4.2.0 to checkout that branch).

mark

On Wed, Nov 20, 2019 at 7:24 PM Guilherme <guilher...@gmail.com> wrote:
Hi Mark, thanks for the answer.

I have tried to run this test with resmoke.py but it is still failing. I put the result on pastebin so that you can take a look.

Regards

--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages