incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1520586 - in /sling/trunk/contrib/extensions/healthcheck/core/src: main/java/org/apache/sling/hc/core/impl/ test/java/org/apache/sling/hc/core/impl/
Date Fri, 06 Sep 2013 14:46:41 GMT
Author: bdelacretaz
Date: Fri Sep  6 14:46:41 2013
New Revision: 1520586

URL: http://svn.apache.org/r1520586
Log:
SLING-3034 - rename JmxScriptBindingsProvider

Added:
    sling/trunk/contrib/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProvider.java
      - copied, changed from r1520576, sling/trunk/contrib/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBinding.java
    sling/trunk/contrib/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProviderTest.java
      - copied, changed from r1520576, sling/trunk/contrib/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/JmxScriptBindingTest.java
Removed:
    sling/trunk/contrib/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBinding.java
    sling/trunk/contrib/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/JmxScriptBindingTest.java
Modified:
    sling/trunk/contrib/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/ScriptableHealthCheckTest.java

Copied: sling/trunk/contrib/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProvider.java
(from r1520576, sling/trunk/contrib/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBinding.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProvider.java?p2=sling/trunk/contrib/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProvider.java&p1=sling/trunk/contrib/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBinding.java&r1=1520576&r2=1520586&rev=1520586&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBinding.java
(original)
+++ sling/trunk/contrib/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProvider.java
Fri Sep  6 14:46:41 2013
@@ -43,7 +43,7 @@ import org.slf4j.LoggerFactory;
 @Component
 @Service
 @Property(name="context", value="healthcheck")
-public class JmxScriptBinding implements BindingsValuesProvider {
+public class JmxScriptBindingsProvider implements BindingsValuesProvider {
     private MBeanServer jmxServer = ManagementFactory.getPlatformMBeanServer();
     private final Logger log = LoggerFactory.getLogger(getClass());
     public static final String JMX_BINDING_NAME = "jmx";

Copied: sling/trunk/contrib/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProviderTest.java
(from r1520576, sling/trunk/contrib/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/JmxScriptBindingTest.java)
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProviderTest.java?p2=sling/trunk/contrib/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProviderTest.java&p1=sling/trunk/contrib/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/JmxScriptBindingTest.java&r1=1520576&r2=1520586&rev=1520586&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/JmxScriptBindingTest.java
(original)
+++ sling/trunk/contrib/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProviderTest.java
Fri Sep  6 14:46:41 2013
@@ -22,16 +22,15 @@ import static org.junit.Assert.assertTru
 
 import java.lang.management.ManagementFactory;
 
-import org.apache.sling.hc.core.impl.JmxScriptBinding;
 import org.apache.sling.hc.util.FormattingResultLog;
 import org.junit.Test;
 
-public class JmxScriptBindingTest {
+public class JmxScriptBindingsProviderTest {
     
     @Test
     public void testJmxAttribute() throws Exception {
         final FormattingResultLog resultLog = new FormattingResultLog();
-        final JmxScriptBinding.AttributeBinding b = new JmxScriptBinding.AttributeBinding(ManagementFactory.getPlatformMBeanServer(),
resultLog);
+        final JmxScriptBindingsProvider.AttributeBinding b = new JmxScriptBindingsProvider.AttributeBinding(ManagementFactory.getPlatformMBeanServer(),
resultLog);
         final Object value= b.attribute("java.lang:type=ClassLoading", "LoadedClassCount");
         assertNotNull("Expecting non-null attribute value", value);
         assertTrue("Expecting non-empty value", value.toString().length() > 0);

Modified: sling/trunk/contrib/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/ScriptableHealthCheckTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/ScriptableHealthCheckTest.java?rev=1520586&r1=1520585&r2=1520586&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/ScriptableHealthCheckTest.java
(original)
+++ sling/trunk/contrib/extensions/healthcheck/core/src/test/java/org/apache/sling/hc/core/impl/ScriptableHealthCheckTest.java
Fri Sep  6 14:46:41 2013
@@ -39,7 +39,7 @@ public class ScriptableHealthCheckTest {
     private ScriptableHealthCheck hc;
     private Dictionary<String, String> props;
     private ComponentContext ctx;
-    private final JmxScriptBinding jmxScriptBinding = new JmxScriptBinding();
+    private final JmxScriptBindingsProvider jmxScriptBindingsProvider = new JmxScriptBindingsProvider();
 
     private void assertExpression(String expression, String languageExtension, boolean expected)
throws Exception {
         final ScriptEngine rhino = new ScriptEngineManager().getEngineByExtension("js");
@@ -65,7 +65,7 @@ public class ScriptableHealthCheckTest {
         hc = new ScriptableHealthCheck();
         ctx = Mockito.mock(ComponentContext.class);
         props = new Hashtable<String, String>();
-        hc.bindBindingsValuesProvider(jmxScriptBinding);
+        hc.bindBindingsValuesProvider(jmxScriptBindingsProvider);
     }
     
     @Test
@@ -77,7 +77,7 @@ public class ScriptableHealthCheckTest {
     public void testRemoveBinding() throws Exception {
         final String expr = "jmx.attribute('java.lang:type=ClassLoading', 'LoadedClassCount')
> 10"; 
         assertExpression(expr, "ecma", true);
-        hc.unbindBindingsValuesProvider(jmxScriptBinding);
+        hc.unbindBindingsValuesProvider(jmxScriptBindingsProvider);
         assertExpression(expr, "ecma", false);
     }
     



Mime
View raw message