Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
import static org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.atMost;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

Expand Down Expand Up @@ -159,8 +160,10 @@ public void testThrottledExecution() throws InterruptedException {

waitInUi(300);

// Call to lines provider should be throttled
verify(linesProvider, times(2)).getStickyLines(sourceViewer, stickyLinesProperties);
// Call to lines provider should be throttled, at least one and at most
// 3 calls expected
verify(linesProvider, atMost(3)).getStickyLines(sourceViewer, stickyLinesProperties);
verify(linesProvider, atLeastOnce()).getStickyLines(sourceViewer, stickyLinesProperties);
}

private void waitInUi(int ms) throws InterruptedException {
Expand Down
Loading