diff options
author | Shawn Pearce <spearce@spearce.org> | 2013-04-10 09:41:55 -0700 |
---|---|---|
committer | Shawn Pearce <spearce@spearce.org> | 2013-04-10 12:59:11 -0700 |
commit | d01fe3279530a2939bf917d26e393efb85079ca1 (patch) | |
tree | dff3b715e4f4376d9eae07d215be44f31ac7eea3 /org.eclipse.jgit.test/tst/org/eclipse/jgit | |
parent | 66192817cd52c6f7049be4491787ca40923de014 (diff) | |
download | jgit-d01fe3279530a2939bf917d26e393efb85079ca1.tar.gz jgit-d01fe3279530a2939bf917d26e393efb85079ca1.zip |
Skip main thread test in ThreadSafeProgressMonitor
update(int) is only invoked from a worker thread, in JGit's case
this is DeltaTask. The Javadoc of TSPM suggests update should only
ever be used by a worker thread.
Skip the main thread check, saving some cycles on each run of the
progress monitor.
Change-Id: I6cb9382d71b4cb3f8e8981c7ac382da25304dfcb
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ThreadSafeProgressMonitorTest.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ThreadSafeProgressMonitorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ThreadSafeProgressMonitorTest.java index b44970e358..2845f8acfe 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ThreadSafeProgressMonitorTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ThreadSafeProgressMonitorTest.java @@ -104,9 +104,11 @@ public class ThreadSafeProgressMonitorTest { assertEquals(42, mock.value); pm.update(1); + pm.pollForUpdates(); assertEquals(43, mock.value); pm.update(2); + pm.pollForUpdates(); assertEquals(45, mock.value); pm.endTask(); |