aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.lfs.server.test/tst
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2019-06-08 15:47:42 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2019-06-11 10:51:30 +0900
commit8bd0ba0f150feb485295f8c3890648eddf05fa41 (patch)
tree32ffee262ac41dc3adef2b3fc0c6a97a35c88f14 /org.eclipse.jgit.lfs.server.test/tst
parent518dc8638073a8371b4d5d77c265d70f96d62ff1 (diff)
downloadjgit-8bd0ba0f150feb485295f8c3890648eddf05fa41.tar.gz
jgit-8bd0ba0f150feb485295f8c3890648eddf05fa41.zip
ErrorProne: Increase severity of FutureReturnValueIgnored to ERROR
The only remaining code where the return value is ignored is in tests. Update them to store the value and perform a basic assertion. Change-Id: I29ef5bd5dd0648aac3490f9e47ecc74544109652 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.lfs.server.test/tst')
-rw-r--r--org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java
index c6f9535564..2334ec37af 100644
--- a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java
+++ b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java
@@ -44,6 +44,7 @@ package org.eclipse.jgit.lfs.server.fs;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -56,6 +57,7 @@ import java.util.List;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import org.eclipse.jgit.lfs.lib.AnyLongObjectId;
@@ -122,11 +124,12 @@ public class UploadTest extends LfsServerTest {
ExecutorService e = Executors.newFixedThreadPool(count);
try {
for (Path p : paths) {
- e.submit(() -> {
+ Future<Object> result = e.submit(() -> {
barrier.await();
putContent(p);
return null;
});
+ assertNotNull(result);
}
} finally {
e.shutdown();