The assertion: checkLog.checkContainsWithCountJson(conn, FETCH_LOG_ID, {}, 5) is too specific and doesn't take into account the time between the mongod process start until the mongo shell connection is accepted, which may happen slowly (e.g. 8 seconds in the BF). Within this 8 seconds, there have already been 5 fetch retries, so when the script sleeps for an additional 10 seconds, another fetch occurs bringing the number of fetches to 6, thus causing an assertion failure.
The assertion needs to change to something like checkLog.containsWithAtLeastCount(conn, msg, 5).