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

Simplify test functionality for creating resource hierarchies #903 #914

Conversation

HeikoKlare
Copy link
Contributor

The ResourceTest class provides several functions for defining and creating a hierarchy of resources encoded into a string array. This functionality is hard to understand as it uses a default factory method in the ResourceTest class that may be called by a template method in ResourceTest and may be overwritten in subclasses. In addition, the functionality is not used very often.

This change streamlines the functionality for creating resource hierarchies. It makes the creation explicit where it is required by inlining the string definitions where possible or implementing the hierarchy creation in the actual test class rather than relying on the template method in the ResourceTest superclass. This makes the tests more independent from their JUnit 3-specific type hierarchy.

Contributes to #903

Copy link
Contributor

github-actions bot commented Dec 4, 2023

Test Results

     591 files  ±0       591 suites  ±0   1h 14m 34s ⏱️ + 10m 57s
  3 842 tests ±0    3 837 ✔️ ±0    5 💤 ±0  0 ±0 
12 132 runs  ±0  12 096 ✔️ ±0  36 💤 ±0  0 ±0 

Results for commit 0585867. ± Comparison against base commit 326506c.

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare marked this pull request as ready for review December 4, 2023 14:52
@HeikoKlare HeikoKlare force-pushed the ResourceTest-simplify-buildResources branch from d9c4a18 to 49b6710 Compare December 4, 2023 15:11
…-platform#903

The ResourceTest class provides several functions for defining and
creating a hierarchy of resources encoded into a string array. This
functionality is hard to understand as it uses a default factory method
in the ResourceTest class that may be called by a template method in
ResourceTest and may be overwritten in subclasses. In addition, the
functionality is not used very often.

This change streamlines the functionality for creating resource
hierarchies. It makes the creation explicit where it is required by
inlining the string definitions where possible or implementing the
hierarchy creation in the actual test class rather than relying on the
template method in the ResourceTest superclass. This makes the tests
more independent from their JUnit 3-specific type hierarchy.

Contributes to
eclipse-platform#903
@HeikoKlare HeikoKlare force-pushed the ResourceTest-simplify-buildResources branch from 49b6710 to 0585867 Compare December 4, 2023 17:41
@HeikoKlare HeikoKlare merged commit 21347e8 into eclipse-platform:master Dec 4, 2023
16 checks passed
@HeikoKlare HeikoKlare deleted the ResourceTest-simplify-buildResources branch December 4, 2023 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant