Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-23704

shard_keycount.js does not invoke anonymous function

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.6, 3.3.5
    • Affects Version/s: 3.2.0-rc1
    • Component/s: Sharding
    • Labels:
    • Fully Compatible
    • ALL

      This causes the jstest to accidentally not be run, and so always pass.

      https://github.com/mongodb/mongo/blob/r3.3.4/jstests/sharding/shard_keycount.js#L46

      Just needs

      Unable to find source-code formatter for language: diff. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      diff --git a/jstests/sharding/shard_keycount.js b/jstests/sharding/shard_keycount.js
      index 9a63a2c..893e201 100644
      --- a/jstests/sharding/shard_keycount.js
      +++ b/jstests/sharding/shard_keycount.js
      @@ -43,4 +43,4 @@
      
           s.stop();
      
      -});
      +})();
      

      Command where this was noticed (this seems to be the only occurrence, but I didn't check thoroughly)

      for i in `grep -l '^(function *()' jstests/*/*`; do echo; echo "$i"; tail -1 "$i"; done
      

      cc kamran.khan

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: