Skip to content

Commit 115a991

Browse files
committed
added monitoring exporter test and utility to build and start it part 2
1 parent 6d30977 commit 115a991

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

integration-tests/src/test/java/oracle/kubernetes/operator/ITMonitoringExporter.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
1212
import com.gargoylesoftware.htmlunit.WebClient;
13-
import com.gargoylesoftware.htmlunit.html.HtmlPage;
14-
import com.gargoylesoftware.htmlunit.html.HtmlForm;
15-
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
1613
import com.gargoylesoftware.htmlunit.html.HtmlFileInput;
14+
import com.gargoylesoftware.htmlunit.html.HtmlForm;
15+
import com.gargoylesoftware.htmlunit.html.HtmlPage;
1716
import com.gargoylesoftware.htmlunit.html.HtmlRadioButtonInput;
17+
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
1818
import java.io.BufferedReader;
1919
import java.io.InputStream;
2020
import java.io.InputStreamReader;
@@ -27,12 +27,12 @@
2727
import oracle.kubernetes.operator.utils.Domain;
2828
import oracle.kubernetes.operator.utils.Operator;
2929
import oracle.kubernetes.operator.utils.TestUtils;
30+
import org.junit.AfterClass;
3031
import org.junit.Assert;
3132
import org.junit.Assume;
33+
import org.junit.BeforeClass;
3234
import org.junit.FixMethodOrder;
3335
import org.junit.Test;
34-
import org.junit.AfterClass;
35-
import org.junit.BeforeClass;
3636
import org.junit.runners.MethodSorters;
3737

3838
/** This test is used for testing Monitoring Exporter with Operator(s) */
@@ -235,16 +235,16 @@ public void test01_ReplaceConfiguration() throws Exception {
235235
String testMethodName = new Object() {}.getClass().getEnclosingMethod().getName();
236236
logTestBegin(testMethodName);
237237
boolean testCompletedSuccessfully = false;
238-
/*
239-
exporterUrl = "http://slc13kef.us.oracle.com:" + "30305" + "/wls-exporter/";
240-
metricsUrl = exporterUrl + "metrics";
241-
configPath =
242-
"/scratch/mkogan/weblogic-kubernetes-operator/integration-tests/src/test/resources/exporter";
243-
String testWSAppTotalServletInvokesSearchKey1 =
244-
"weblogic_servlet_invocation_total_count{app=\"testwsapp\",name=\"managed-server1_/TestWSApp\",servletName=\"TestWSAppServlethttp\"}";
245-
String testWSAppTotalServletInvokesSearchKey2 =
246-
"weblogic_servlet_invocation_total_count{app=\"testwsapp\",name=\"managed-server2_/TestWSApp\",servletName=\"TestWSAppServlethttp\"}";
247-
*/
238+
/*
239+
exporterUrl = "http://slc13kef.us.oracle.com:" + "30305" + "/wls-exporter/";
240+
metricsUrl = exporterUrl + "metrics";
241+
configPath =
242+
"/scratch/mkogan/weblogic-kubernetes-operator/integration-tests/src/test/resources/exporter";
243+
String testWSAppTotalServletInvokesSearchKey1 =
244+
"weblogic_servlet_invocation_total_count{app=\"testwsapp\",name=\"managed-server1_/TestWSApp\",servletName=\"TestWSAppServlethttp\"}";
245+
String testWSAppTotalServletInvokesSearchKey2 =
246+
"weblogic_servlet_invocation_total_count{app=\"testwsapp\",name=\"managed-server2_/TestWSApp\",servletName=\"TestWSAppServlethttp\"}";
247+
*/
248248
HtmlPage page = submitConfigureForm(exporterUrl, "replace", configPath + "/rest_jvm.yml");
249249

250250
// check for updated metrics

0 commit comments

Comments
 (0)