)]}'
{
  "commit": "dbe485d16d3193b5f40fb46e5a89b918b3292630",
  "tree": "27bf083470ca6a4609ae20f2f6b933c8edbb5a18",
  "parents": [
    "ac29d9a32079f102853f64d612326ad9f29da3af"
  ],
  "author": {
    "name": "David Ostrovsky",
    "email": "david@ostrovsky.org",
    "time": "Sat Jul 18 08:26:36 2020 +0200"
  },
  "committer": {
    "name": "Marco Miller",
    "email": "marco.mmiller@gmail.com",
    "time": "Tue Jul 28 20:44:27 2020 +0000"
  },
  "message": "Adapt the test code to not mock cache instances\n\nRecent Bazel upgrades Error Prone major version to 2.4.0, that is much\nstricter now. Particularly DoNotMock pattern doesn\u0027t allow to Mock cache\ninstances any more:\n\n  RateLimitUploadListenerTest.java:44: error: [DoNotMock] Do not mock\n  \u0027com.google.common.cache.LoadingCache\u003cjava.lang.String,com.googlesource.gerrit.plugins.quota.Module.Holder\u003e\u0027\n  (which is-a \u0027com.google.common.cache.Cache\u0027); com.google.common.cache.Cache is annotated as @DoNotMock:\n  Use CacheBuilder.newBuilder().build().\n  @Mock private LoadingCache\u003cString, Holder\u003e limitsPerRemoteHost;\n                                             ^\n    (see https://errorprone.info/bugpattern/DoNotMock)\n\nAdapt the code to not mock the cache instance.\n\nOne side effect of this change, is that testDoFilterCacheMiss test is\nremoved.\n\nThe ExecutionException is thrown when a cache loader throws a (runtime)\nexception while loading a value (which wasn\u0027t present in the cache). The\nthrown ExecutionException wraps the root cause exception. However, the\nreason for testing this behavior here is not clear. Further, it is also\nnot clear why should in the case of ExecutionException all requests be\nrejected as if the rate limit was exceeded.\n\nChange-Id: Ieb1327ed71df2f72bcd7243fae9821168dc07238\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "fc6a1962709a5ad0c36bf2229d2a91621a339ea4",
      "old_mode": 33188,
      "old_path": "src/test/java/com/googlesource/gerrit/plugins/quota/RateLimitUploadListenerTest.java",
      "new_id": "fc4dc7658e93e21af5338a1261ec4eb51a4c3b66",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/quota/RateLimitUploadListenerTest.java"
    },
    {
      "type": "modify",
      "old_id": "47952127bc1c0ca01dbdec0a7f35add3e093b07d",
      "old_mode": 33188,
      "old_path": "src/test/java/com/googlesource/gerrit/plugins/quota/RestApiRateLimiterTest.java",
      "new_id": "7dafad3e3c70caf63eeb37f63812e95e9846ba43",
      "new_mode": 33188,
      "new_path": "src/test/java/com/googlesource/gerrit/plugins/quota/RestApiRateLimiterTest.java"
    }
  ]
}
