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

Failure of Bug468PerformanceTest.test #715

Closed
fedejeanne opened this issue Sep 22, 2023 · 9 comments · Fixed by #852
Closed

Failure of Bug468PerformanceTest.test #715

fedejeanne opened this issue Sep 22, 2023 · 9 comments · Fixed by #852
Labels
test junit test related things

Comments

@fedejeanne
Copy link
Contributor

Failed in this build of #704

org.eclipse.core.tests.internal.properties.Bug468PerformanceTest.test -- Time elapsed: 122.0 s <<< FAILURE!
junit.framework.AssertionFailedError: The expected max time(ms): 60000, actual time(ms): 70916
	at junit.framework.Assert.fail(Assert.java:57)
	at junit.framework.Assert.assertTrue(Assert.java:22)
	at junit.framework.TestCase.assertTrue(TestCase.java:192)
	at org.eclipse.core.tests.internal.properties.Bug468PerformanceTest.test(Bug468PerformanceTest.java:163)
lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Nov 10, 2023
Failure of the testcase in Mac OS only.
Fix provided as such performance time limit is increased to 75 seconds
from 60 seconds only for Mac OS. The testcase took around 71 seconds for
Mac OS in the build
(https://github.com/eclipse-platform/eclipse.platform/actions/runs/6263790505/job/17008968379?pr=704)

Fixes eclipse-platform#715
lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Nov 10, 2023
Failure of the testcase in Mac OS only.
Fix provided as such performance time limit is increased to 75 seconds
from 60 seconds only for Mac OS. The testcase took around 71 seconds for
Mac OS in the build
(https://github.com/eclipse-platform/eclipse.platform/actions/runs/6263790505/job/17008968379?pr=704)

Fixes eclipse-platform#715
@jukzi jukzi added the test junit test related things label Nov 28, 2023
HeikoKlare pushed a commit to lathapatil/eclipse.platform that referenced this issue Nov 29, 2023
Failure of the testcase in Mac OS only.
Fix provided as such performance time limit is increased to 75 seconds
from 60 seconds only for Mac OS. The testcase took around 71 seconds for
Mac OS in the build
(https://github.com/eclipse-platform/eclipse.platform/actions/runs/6263790505/job/17008968379?pr=704)

Fixes eclipse-platform#715
HeikoKlare pushed a commit to lathapatil/eclipse.platform that referenced this issue Nov 29, 2023
Failure of the testcase in Mac OS only.
Fix provided as such performance time limit is increased to 75 seconds
from 60 seconds only for Mac OS. The testcase took around 71 seconds for
Mac OS in the build
(https://github.com/eclipse-platform/eclipse.platform/actions/runs/6263790505/job/17008968379?pr=704)

Fixes eclipse-platform#715
@jukzi
Copy link
Contributor

jukzi commented Nov 29, 2023

i got The expected max time(ms): 60000, actual time(ms): 96100. please verify there is no performance regression. If none just increase timeout

@jukzi
Copy link
Contributor

jukzi commented Nov 29, 2023

@lathapatil @iloveeclipse test was added for #468

@HeikoKlare
Copy link
Contributor

There already is a PR for increasing the timeout: #852
The time taken by the test differs heavily between test runs, maybe also because of hardware utilization. Right now we have several builds running to get all pending PRs merged, so maybe several jobs are running on the same hardware affecting the times taken by the test.

And there was also some discussion in the PR for increasing the timeout on how to replace that performance test with a functional test, since no performance test is actually required here (and it obviously takes quite some build time, even if timeout is set properly). But as a quick fix I would like to merge the timeout change to have more stable builds and replace the test afterwards.

@lathapatil

This comment was marked as resolved.

HeikoKlare added a commit to HeikoKlare/eclipse.platform that referenced this issue Nov 29, 2023
The test often exceeds 60 seconds timeout on MacOS machines. Proposals
for replacing the performance test with a functionality test have been
made. To avoid spending more than a minute on a single test until the
test has been replaced, this change disables the test until then.

Contributes to
eclipse-platform#715
@HeikoKlare
Copy link
Contributor

Temporary disablement proposed in #891.

One note for the test reimplementation: The test is currently written on JUnit 3, which is pretty outdated. When rewriting the test, please write it for JUnit 4/5 instead.

@HeikoKlare
Copy link
Contributor

For documentation of discussion in PR #852 on replacement of the performance test with a functional regression test:

If I see correctly, this is supposed to be a regression test for #468. This bug is about unnecessary tree traversal with delete calls on every element. Wouldn't it be sufficient to write a regression test for the behavior rather than for its performance? I.e., replace this performance test by one that validates that delete is only called on the the root IFile in the addressed scenario, but not for elements deeper in the tree?

See #852 (comment)

HeikoKlare added a commit that referenced this issue Nov 29, 2023
The test often exceeds 60 seconds timeout on MacOS machines. Proposals
for replacing the performance test with a functionality test have been
made. To avoid spending more than a minute on a single test until the
test has been replaced, this change disables the test until then.

Contributes to
#715
HeikoKlare added a commit to HeikoKlare/eclipse.platform that referenced this issue Nov 29, 2023
Extends the test disablement to be handled by JUnit 3.

Contributes to
eclipse-platform#715
HeikoKlare added a commit to HeikoKlare/eclipse.platform that referenced this issue Nov 29, 2023
Extends the test disablement to be handled by JUnit 3.

Contributes to
eclipse-platform#715
HeikoKlare added a commit that referenced this issue Nov 29, 2023
Extends the test disablement to be handled by JUnit 3.

Contributes to
#715
@lathapatil
Copy link
Contributor

replacement of the performance test with a functional regression test:

Is it expected to have below kind of testcase ? If yes , I am stuck with issues in completing the case ..

I have written it to verify for given IFile resource deleteProperties method is called with depth Zero

@Mock
PropertyManager2 manager;
@Test
	public void test() throws CoreException {

		IFolder tempFolder = this.project.getFolder(TEMP_FOLDER_NAME);
		IFile fileToBeDeleted = tempFolder.getFile(TO_BE_DELETED_FILE_NAME_PREFIX + 0);
		
			Mockito.doCallRealMethod().when(manager).deleteResource(fileToBeDeleted);
			
			verify(manager).deleteProperties(fileToBeDeleted, 0);

	}

Facing an error

Wanted but not invoked:
propertyManager2.deleteProperties(
L/test_TestProject/temp/file_0,
0
);
-> at org.eclipse.core.internal.properties.PropertyManager2.deleteProperties(PropertyManager2.java:113)
Actually, there were zero interactions with this mock.

And also tried with Argument capture

@Mock
	PropertyManager2 manager;
	@Captor
	ArgumentCaptor<IResource> resourceArgCaptor;
	@Captor
	ArgumentCaptor<Integer> depthArgCapture;
	@Test
	public void test() throws CoreException {

		IFolder tempFolder = this.project.getFolder(TEMP_FOLDER_NAME);
		IFile fileToBeDeleted = tempFolder.getFile(TO_BE_DELETED_FILE_NAME_PREFIX + 0);
		
		manager.deleteResource(fileToBeDeleted);

		Mockito.verify(manager).deleteProperties(resourceArgCaptor.capture(), depthArgCapture.capture());
		Integer expectedDepth = 0;
		assertEquals(expectedDepth, depthArgCapture.getValue());
		}

But, Facing an error here too

Wanted but not invoked:
manager.deleteProperties(
,

);
-> at org.eclipse.core.internal.properties.PropertyManager2.deleteProperties(PropertyManager2.java:113)

However, there was exactly 1 interaction with this mock:
manager.deleteResource(
L/test_TestProject/temp/file_0

@lathapatil
Copy link
Contributor

Is it expected to have below kind of testcase ? If yes , I am stuck with issues in completing the case ..

I am able to resolve the issues . @HeikoKlare I just need confirmation if this is the kind of testcase expected so that I can go for new PR

lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Dec 6, 2023
Failure of the testcase in Mac OS only.
Fix provided as such performance time limit is increased to 75 seconds
from 60 seconds only for Mac OS. The testcase took around 71 seconds for
Mac OS in the build
(https://github.com/eclipse-platform/eclipse.platform/actions/runs/6263790505/job/17008968379?pr=704)

Fixes eclipse-platform#715
@HeikoKlare
Copy link
Contributor

Yes, that would be the idea for such a test case.

lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Dec 7, 2023
Failure of the testcase in Mac OS only.
Fix provided as such performance time limit is increased to 75 seconds
from 60 seconds only for Mac OS. The testcase took around 71 seconds for
Mac OS in the build
(https://github.com/eclipse-platform/eclipse.platform/actions/runs/6263790505/job/17008968379?pr=704)

Fixes eclipse-platform#715
lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Dec 11, 2023
Failure of the testcase in Mac OS only.
Fix provided as such performance time limit is increased to 75 seconds
from 60 seconds only for Mac OS. The testcase took around 71 seconds for
Mac OS in the build
(https://github.com/eclipse-platform/eclipse.platform/actions/runs/6263790505/job/17008968379?pr=704)

Fixes eclipse-platform#715
lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Dec 11, 2023
Failure of the testcase in Mac OS only.
Fix provided as such performance time limit is increased to 75 seconds
from 60 seconds only for Mac OS. The testcase took around 71 seconds for
Mac OS in the build
(https://github.com/eclipse-platform/eclipse.platform/actions/runs/6263790505/job/17008968379?pr=704)

Fixes eclipse-platform#715
lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Dec 11, 2023
Failure of the testcase in Mac OS only.
Fix provided as such performance time limit is increased to 75 seconds
from 60 seconds only for Mac OS. The testcase took around 71 seconds for
Mac OS in the build
(https://github.com/eclipse-platform/eclipse.platform/actions/runs/6263790505/job/17008968379?pr=704)

Fixes eclipse-platform#715
lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Dec 19, 2023
Failure of the testcase in Mac OS only.
Fix provided as such performance time limit is increased to 75 seconds
from 60 seconds only for Mac OS. The testcase took around 71 seconds for
Mac OS in the build
(https://github.com/eclipse-platform/eclipse.platform/actions/runs/6263790505/job/17008968379?pr=704)

Fixes eclipse-platform#715
lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Dec 20, 2023
Failure of the testcase in Mac OS only.
Fix provided as such performance time limit is increased to 75 seconds
from 60 seconds only for Mac OS. The testcase took around 71 seconds for
Mac OS in the build
(https://github.com/eclipse-platform/eclipse.platform/actions/runs/6263790505/job/17008968379?pr=704)

Fixes eclipse-platform#715
lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Dec 20, 2023
Convert performance test to functional test case.

Fixes eclipse-platform#715
lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Dec 21, 2023
Convert performance test to functional test case.

Fixes eclipse-platform#715
lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Dec 22, 2023
Convert performance test to functional test case.

Fixes eclipse-platform#715
Michael5601 pushed a commit to CodeLtDave/eclipse.platform that referenced this issue Feb 12, 2024
The test often exceeds 60 seconds timeout on MacOS machines. Proposals
for replacing the performance test with a functionality test have been
made. To avoid spending more than a minute on a single test until the
test has been replaced, this change disables the test until then.

Contributes to
eclipse-platform#715
Michael5601 pushed a commit to CodeLtDave/eclipse.platform that referenced this issue Feb 12, 2024
Extends the test disablement to be handled by JUnit 3.

Contributes to
eclipse-platform#715
lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Mar 13, 2024
Convert performance test to functional test case.

Fixes eclipse-platform#715
lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Mar 13, 2024
Convert performance test to functional test case.

Fixes eclipse-platform#715
lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Mar 13, 2024
Convert performance test to functional test case.

Fixes eclipse-platform#715

Review points addressed
lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Mar 13, 2024
Convert performance test to functional test case.

Fixes eclipse-platform#715

Review points addressed
The testcase from this class is moved to PropertyManagerTest.java
lathapatil added a commit to lathapatil/eclipse.platform that referenced this issue Mar 25, 2024
Convert performance test to functional test case.

Fixes eclipse-platform#715

Review points addressed
The testcase from this class is moved to PropertyManagerTest.java
review points addressed
review points addressed
HeikoKlare pushed a commit to lathapatil/eclipse.platform that referenced this issue Mar 25, 2024
Convert performance test to functional test case.

Fixes eclipse-platform#715

Review points addressed
The testcase from this class is moved to PropertyManagerTest.java
review points addressed
review points addressed
HeikoKlare pushed a commit to lathapatil/eclipse.platform that referenced this issue Mar 26, 2024
Convert performance test to functional test case.

Fixes eclipse-platform#715

Review points addressed
The testcase from this class is moved to PropertyManagerTest.java
review points addressed
review points addressed
HeikoKlare pushed a commit to lathapatil/eclipse.platform that referenced this issue Mar 27, 2024
Convert performance test to functional test case.

Fixes eclipse-platform#715

Review points addressed
The testcase from this class is moved to PropertyManagerTest.java
review points addressed
review points addressed
HeikoKlare pushed a commit that referenced this issue Mar 27, 2024
Convert performance test to functional test case.

Fixes #715

Review points addressed
The testcase from this class is moved to PropertyManagerTest.java
review points addressed
review points addressed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test junit test related things
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants