Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StickyScrollingHandlerTest.testThrottledExecution fails on mac #2190

Closed
jukzi opened this issue Aug 14, 2024 · 7 comments · Fixed by #2219 or #2382
Closed

StickyScrollingHandlerTest.testThrottledExecution fails on mac #2190

jukzi opened this issue Aug 14, 2024 · 7 comments · Fixed by #2219 or #2382
Assignees
Labels
bug Something isn't working test junit test related things

Comments

@jukzi
Copy link
Contributor

jukzi commented Aug 14, 2024

https://download.eclipse.org/eclipse/downloads/drops4/I20240811-1800/testresults/html/org.eclipse.ui.editors.tests_ep433I-unit-macM1-java17_macosx.cocoa.aarch64_17.html

Wanted but not invoked:
stickyLinesProvider.get(
400,
org.eclipse.jface.text.source.SourceViewer@296023de
);
-> at org.eclipse.ui.internal.texteditor.stickyscroll.StickyLinesProvider.get(StickyLinesProvider.java:47)

However, there was exactly 1 interaction with this mock:
stickyLinesProvider.get(
100,
org.eclipse.jface.text.source.SourceViewer@296023de
);
-> at org.eclipse.ui.internal.texteditor.stickyscroll.StickyScrollingHandler.calculateAndShowStickyLines(StickyScrollingHandler.java:151)


at org.eclipse.ui.internal.texteditor.stickyscroll.StickyLinesProvider.get(StickyLinesProvider.java:47)
at org.eclipse.ui.internal.texteditor.stickyscroll.StickyScrollingHandlerTest.testThrottledExecution(StickyScrollingHandlerTest.java:144)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)

test was recently added with #1949 @mickaelistria @Christopher-Hermann please check next i-Builds after everything you commit on the next day. You can find link to the current integration build here:
https://download.eclipse.org/eclipse/downloads/index.html

@jukzi jukzi added bug Something isn't working test junit test related things labels Aug 14, 2024
@jukzi
Copy link
Contributor Author

jukzi commented Aug 14, 2024

Please also note that the toString() "SourceViewer@296023de" is not meaningfull

@jukzi
Copy link
Contributor Author

jukzi commented Aug 19, 2024

@mickaelistria @Christopher-Hermann would you please fix?

@Christopher-Hermann
Copy link
Contributor

I'm working on a Mac and locally the tests are working. I will try to find out why the tests are failing on the I build.

Christopher-Hermann added a commit to Christopher-Hermann/eclipse.platform.ui that referenced this issue Aug 26, 2024
The unit test StickyScrollingHandlerTest.testThrottledExecution was failing in the I build on MacOS. With this change, the test should run again.

Fixes eclipse-platform#2190
Christopher-Hermann added a commit to Christopher-Hermann/eclipse.platform.ui that referenced this issue Aug 27, 2024
The unit test StickyScrollingHandlerTest.testThrottledExecution was failing in the I build on MacOS. With this change, the test should run again.

Fixes eclipse-platform#2190
Christopher-Hermann added a commit to Christopher-Hermann/eclipse.platform.ui that referenced this issue Aug 29, 2024
The unit test StickyScrollingHandlerTest.testThrottledExecution was failing in the I build on MacOS. With this change, the test should run again.

Fixes eclipse-platform#2190
Christopher-Hermann added a commit to Christopher-Hermann/eclipse.platform.ui that referenced this issue Aug 29, 2024
The unit test StickyScrollingHandlerTest.testThrottledExecution was failing in the I build on MacOS. With this change, the test should run again.

Fixes eclipse-platform#2190
Christopher-Hermann added a commit to Christopher-Hermann/eclipse.platform.ui that referenced this issue Sep 3, 2024
The unit test StickyScrollingHandlerTest.testThrottledExecution was failing in the I build on MacOS. With this change, the test should run again.

Fixes eclipse-platform#2190
Christopher-Hermann added a commit to Christopher-Hermann/eclipse.platform.ui that referenced this issue Sep 4, 2024
The unit test StickyScrollingHandlerTest.testThrottledExecution was failing in the I build on MacOS. With this change, the test should run again.

Fixes eclipse-platform#2190
Christopher-Hermann added a commit to Christopher-Hermann/eclipse.platform.ui that referenced this issue Sep 11, 2024
The unit test StickyScrollingHandlerTest.testThrottledExecution was failing in the I build on MacOS. With this change, the test should run again.

Fixes eclipse-platform#2190
Christopher-Hermann added a commit that referenced this issue Sep 11, 2024
The unit test StickyScrollingHandlerTest.testThrottledExecution was failing in the I build on MacOS. With this change, the test should run again.

Fixes #2190
@Christopher-Hermann
Copy link
Contributor

Test is still failing in IBuild

@Christopher-Hermann
Copy link
Contributor

Let's see if the refactoring done with #2266 resolves the issue.

@jukzi
Copy link
Contributor Author

jukzi commented Sep 30, 2024

still fails.

iStickyLinesProvider.getStickyLines( org.eclipse.jface.text.source.SourceViewer@55e13772, StickyLinesProperties[tabWith=4] ); Wanted 2 times: -> 
at org.eclipse.ui.internal.texteditor.stickyscroll.StickyScrollingHandlerTest.testThrottledExecution(StickyScrollingHandlerTest.java:163) But was 1 time: -> 
at org.eclipse.ui.internal.texteditor.stickyscroll.StickyScrollingHandler.calculateAndShowStickyLines(StickyScrollingHandler.java:154)

org.mockito.exceptions.verification.TooFewActualInvocations:
iStickyLinesProvider.getStickyLines(
org.eclipse.jface.text.source.SourceViewer@55e13772,
StickyLinesProperties[tabWith=4]
);
Wanted 2 times:
-> 
at org.eclipse.ui.internal.texteditor.stickyscroll.StickyScrollingHandlerTest.testThrottledExecution(StickyScrollingHandlerTest.java:163)
But was 1 time:
-> 
at org.eclipse.ui.internal.texteditor.stickyscroll.StickyScrollingHandler.calculateAndShowStickyLines(StickyScrollingHandler.java:154)
at org.eclipse.ui.internal.texteditor.stickyscroll.StickyScrollingHandlerTest.testThrottledExecution(StickyScrollingHandlerTest.java:163)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)

https://download.eclipse.org/eclipse/downloads/drops4/I20240929-1800/testresults/html/org.eclipse.ui.editors.tests_ep434I-unit-mac64-java17_macosx.cocoa.x86_64_17.html

@Christopher-Hermann
Copy link
Contributor

I will have a look

Christopher-Hermann added a commit to Christopher-Hermann/eclipse.platform.ui that referenced this issue Oct 10, 2024
The calls to the lines provider should be throttled. Expect at least one call and at most 3 calls.

Fixes: eclipse-platform#2190
Christopher-Hermann added a commit to Christopher-Hermann/eclipse.platform.ui that referenced this issue Oct 10, 2024
The calls to the lines provider should be throttled. Expect at least one call and at most 3 calls.

Fixes: eclipse-platform#2190
BeckerWdf pushed a commit that referenced this issue Oct 11, 2024
The calls to the lines provider should be throttled. Expect at least one call and at most 3 calls.

Fixes: #2190
praveen-skp pushed a commit to praveen-skp/eclipse.platform.ui that referenced this issue Oct 14, 2024
The calls to the lines provider should be throttled. Expect at least one call and at most 3 calls.

Fixes: eclipse-platform#2190
lathapatil pushed a commit to lathapatil/eclipse.platform.ui that referenced this issue Oct 21, 2024
The unit test StickyScrollingHandlerTest.testThrottledExecution was failing in the I build on MacOS. With this change, the test should run again.

Fixes eclipse-platform#2190
lathapatil pushed a commit to lathapatil/eclipse.platform.ui that referenced this issue Oct 21, 2024
The calls to the lines provider should be throttled. Expect at least one call and at most 3 calls.

Fixes: eclipse-platform#2190
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test junit test related things
Projects
None yet
2 participants