-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Query Execution 2021-05-31, Query Execution 2021-06-14
-
26
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Currently, the change stream does not log 2 objects that are being compared if there is an assertion failure. Consider the snippet:
assert.eq(bsonWoCompare(getMorePBRT, txnEvent3._id), 0);
Where if getMorePBRT != txnEvent3._id and the test case fails, we have no way to figure out what value these two objects contain.
Logging such objects' values might help in making a correlation with the C++ logs.
The proposal here is to do something like this:
Just before such assertion checks, create a dictionary containing objects been compared.
Like this for the above example:
let objectValues = {
getMorPBRT: getMortPBRT,
txnEvent3_id: txnEvent3._id
}
And then checking fo the condition like this:
assert.eq(bsonWoCompare(getMorePBRT, txnEvent3._id), 0, objectValues);
In case of assertion failure, the object_values will be dumped.