This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git


The following commit(s) were added to refs/heads/master by this push:
     new f51842167 Better assertion message
f51842167 is described below

commit f51842167dca2fe61fcacffe9b17cdc747530639
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Jan 23 09:22:01 2025 -0500

    Better assertion message
---
 .../java/org/apache/commons/compress/osgi/AbstractOsgiITest.java | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/src/test/java/org/apache/commons/compress/osgi/AbstractOsgiITest.java 
b/src/test/java/org/apache/commons/compress/osgi/AbstractOsgiITest.java
index 52d374542..86c6802e9 100644
--- a/src/test/java/org/apache/commons/compress/osgi/AbstractOsgiITest.java
+++ b/src/test/java/org/apache/commons/compress/osgi/AbstractOsgiITest.java
@@ -64,10 +64,11 @@ public void testCanLoadBundle() {
 
     @Test
     public void testProperlyDetectsRunningInsideOsgiEnv() throws Exception {
-        final Class<?> osgiUtils = 
loadBundle().loadClass("org.apache.commons.compress.utils.OsgiUtils");
-        assertNotNull("Can load OsgiUtils via bundle", osgiUtils);
+        final String className = "org.apache.commons.compress.utils.OsgiUtils";
+        final Class<?> osgiUtils = loadBundle().loadClass(className);
+        assertNotNull("Can't load " + className + " via bundle", osgiUtils);
         final Method method = 
osgiUtils.getMethod("isRunningInOsgiEnvironment");
-        assertNotNull("Can access isRunningInOsgiEnvironment method", method);
-        assertTrue("Compress detects OSGi environment", (Boolean) 
method.invoke(null));
+        assertNotNull("Can't access isRunningInOsgiEnvironment method", 
method);
+        assertTrue("Compress can't detect OSGi environment", (Boolean) 
method.invoke(null));
     }
 }

Reply via email to