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 and migrate resources content tests to JUnit 5 #903 #1605

Merged

Conversation

HeikoKlare
Copy link
Contributor

Simplifies the tests in org.eclipse.core.tests.resources.content:

  • Removes obsolete ContentTypeTest superclass for test classes, uses
    existing utility functionality instead
  • Removes obsolete numbering of assertions
  • Replaces try/catch/fail with assertThrows or making test framework
    handle the exception

Migrates the tests in org.eclipse.core.tests.resources.content to JUnit 5 by replacing according JUnit annotations and migrating assertions.

Contributes to #903

@eclipse-platform-bot
Copy link
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

runtime/tests/org.eclipse.core.tests.harness/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 5cfcfc4895d0fc7c6a8fe77ecb36c33537594625 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <[email protected]>
Date: Sun, 3 Nov 2024 11:13:29 +0000
Subject: [PATCH] Version bump(s) for 4.34 stream


diff --git a/runtime/tests/org.eclipse.core.tests.harness/META-INF/MANIFEST.MF b/runtime/tests/org.eclipse.core.tests.harness/META-INF/MANIFEST.MF
index 88086087ff..d70afdf6ca 100644
--- a/runtime/tests/org.eclipse.core.tests.harness/META-INF/MANIFEST.MF
+++ b/runtime/tests/org.eclipse.core.tests.harness/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: Eclipse Core Tests Harness
 Bundle-SymbolicName: org.eclipse.core.tests.harness;singleton:=true
-Bundle-Version: 3.17.0.qualifier
+Bundle-Version: 3.17.100.qualifier
 Bundle-Vendor: Eclipse.org
 Export-Package: org.eclipse.core.tests.harness;version="2.0",
  org.eclipse.core.tests.harness.session,
-- 
2.47.0

Further information are available in Common Build Issues - Missing version increments.

Copy link
Contributor

github-actions bot commented Nov 3, 2024

Test Results

 1 755 files  ±0   1 755 suites  ±0   1h 35m 18s ⏱️ + 8m 26s
 4 170 tests +1   4 148 ✅ +1   22 💤 ±0  0 ❌ ±0 
13 107 runs  +3  12 943 ✅ +3  164 💤 ±0  0 ❌ ±0 

Results for commit 0511cbc. ± Comparison against base commit 4712d12.

This pull request removes 2 and adds 3 tests. Note that renamed tests count towards both.
AutomatedResourceTests AllContentTests IContentTypeManagerTest ‑ testContentDescription
AutomatedResourceTests AllContentTests SpecificContextTest ‑ testContentTypeLookup
AutomatedResourceTests AllContentTests IContentTypeManagerTest ‑ testContentDescription(boolean)[1] true
AutomatedResourceTests AllContentTests IContentTypeManagerTest ‑ testContentDescription(boolean)[2] false
AutomatedResourceTests AllContentTests SpecificContextTest ‑ testContentTypeLookup(TestInfo)

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare force-pushed the junit5-resources-content branch 2 times, most recently from 0e07f01 to 6d0782c Compare November 3, 2024 13:00
@HeikoKlare HeikoKlare marked this pull request as ready for review November 3, 2024 13:36
HeikoKlare and others added 3 commits November 6, 2024 17:19
Simplifies the tests in org.eclipse.core.tests.resources.content:
* Removes obsolete ContentTypeTest superclass for test classes, uses
existing utility functionality instead
* Removes obsolete numbering of assertions
* Replaces try/catch/fail with assertThrows or making test framework
handle the exception

Contributes to
eclipse-platform#903
Migrates the tests in org.eclipse.core.tests.resources.content to JUnit
5 by replacing according JUnit annotations and migrating assertions.

Contributes to
eclipse-platform#903
@HeikoKlare HeikoKlare force-pushed the junit5-resources-content branch from 6d0782c to 0511cbc Compare November 6, 2024 16:19
@HeikoKlare HeikoKlare merged commit 7d67aa5 into eclipse-platform:master Nov 7, 2024
17 checks passed
@HeikoKlare HeikoKlare deleted the junit5-resources-content branch November 7, 2024 08:31
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.

2 participants