Skip to content

Commit 011c37b

Browse files
committed
CheckStyle fixes
1 parent 4f8bac6 commit 011c37b

File tree

18 files changed

+276
-286
lines changed

18 files changed

+276
-286
lines changed

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import java.util.HashMap;
88
import java.util.Map;
9+
910
import oracle.kubernetes.operator.utils.Domain;
1011
import oracle.kubernetes.operator.utils.Operator;
1112
import oracle.kubernetes.operator.utils.TestUtils;
@@ -38,7 +39,7 @@ public class ItCoherenceTests extends BaseTest {
3839
* initialization of the integration test properties defined in OperatorIT.properties and setting
3940
* the resultRoot, pvRoot and projectRoot attributes. Also, create the operator.
4041
*
41-
* @throws Exception
42+
* @throws Exception exception
4243
*/
4344
@BeforeClass
4445
public static void staticPrepare() throws Exception {
@@ -50,9 +51,9 @@ public static void staticPrepare() throws Exception {
5051
}
5152

5253
/**
53-
* Releases k8s cluster lease, archives result, pv directories and destroy the operator
54+
* Releases k8s cluster lease, archives result, pv directories and destroy the operator.
5455
*
55-
* @throws Exception
56+
* @throws Exception exception
5657
*/
5758
@AfterClass
5859
public static void staticUnPrepare() throws Exception {
@@ -101,8 +102,8 @@ private static void copyAndExecuteProxyClientInPod(String cacheOp) {
101102
final String domainNS = domain.getDomainNs();
102103

103104
// Use the proxy running on Managed Server 1, get the internal POD IP
104-
String podName = domain.getManagedSeverPodName(1);
105-
String ProxyIP = TestUtils.getPodIP(domainNS, "", podName);
105+
final String podName = domain.getManagedSeverPodName(1);
106+
final String ProxyIP = TestUtils.getPodIP(domainNS, "", podName);
106107

107108
String cohAppLocationOnHost = BaseTest.getAppLocationOnHost() + "/" + PROXY_CLIENT_APP_NAME;
108109
String cohAppLocationInPod = BaseTest.getAppLocationInPod() + "/" + PROXY_CLIENT_APP_NAME;
@@ -140,20 +141,19 @@ private static void copyAndExecuteProxyClientInPod(String cacheOp) {
140141
}
141142

142143
/**
143-
* Create the domain
144+
* Create the domain.
144145
*
145-
* @return
146-
* @throws Exception
146+
* @return domain
147+
* @throws Exception exception
147148
*/
148149
private Domain createDomain() throws Exception {
149150

150-
Map<String, String> envMap = new HashMap();
151+
Map<String, String> envMap = new HashMap<>();
151152

152153
// Set this ENV var with the WDT archive so that it is included in the image build.
153154
envMap.put("CUSTOM_WDT_ARCHIVE", buildProxyServerWdtZip());
154155

155156
// create domain
156-
Domain domain = null;
157157
Map<String, Object> domainMap = TestUtils.loadYaml(DOMAININIMAGE_WDT_YAML);
158158
domainMap.put("namespace", "test1");
159159
domainMap.put("domainUID", "coh");
@@ -163,15 +163,15 @@ private Domain createDomain() throws Exception {
163163
"customWdtTemplate",
164164
BaseTest.getProjectRoot()
165165
+ "/integration-tests/src/test/resources/wdt/coh-wdt-config.yaml");
166-
domain = TestUtils.createDomain(domainMap);
166+
Domain domain = TestUtils.createDomain(domainMap);
167167
domain.verifyDomainCreated();
168-
return domain;
168+
return domain;
169169
}
170170

171171
/**
172-
* Destroy the domain
172+
* Destroy the domain.
173173
*
174-
* @throws Exception
174+
* @throws Exception exception
175175
*/
176176
private static void destroyDomain() throws Exception {
177177
if (domain != null) {
@@ -184,7 +184,7 @@ private static void destroyDomain() throws Exception {
184184
* Verify that all the server pods in the domain got re-started. The property tested is: env:
185185
* "-Dweblogic.StdoutDebugEnabled=false"--> "-Dweblogic.StdoutDebugEnabled=true"
186186
*
187-
* @throws Exception
187+
* @throws Exception exception
188188
*/
189189
private void restartDomainByChangingEnvProperty() throws Exception {
190190

@@ -200,7 +200,7 @@ private void restartDomainByChangingEnvProperty() throws Exception {
200200
}
201201

202202
/**
203-
* Build the WDT zip that contains the Coherence proxy server
203+
* Build the WDT zip that contains the Coherence proxy server.
204204
*
205205
* @return the WDT zip path
206206
*/

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

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ public class ItElasticLogging extends BaseTest {
3737
private static final String elasticStackYamlLoc =
3838
"kubernetes/samples/scripts/elasticsearch-and-kibana/elasticsearch_and_kibana.yaml";
3939
private final String loggingJarRepos =
40-
"https://github.com/oracle/weblogic-logging-exporter/releases/download/v0.1.1";
40+
"https://github.com/oracle/weblogic-logging-exporter/releases/download/v0.1.1";
4141
private final String wlsLoggingExpJar = "weblogic-logging-exporter-0.1.1.jar";
4242
private final String snakeyamlJarRepos =
43-
"https://repo1.maven.org/maven2/org/yaml/snakeyaml/1.23";
43+
"https://repo1.maven.org/maven2/org/yaml/snakeyaml/1.23";
4444
private final String snakeyamlJar = "snakeyaml-1.23.jar";
4545
private static Operator operator;
4646
private static Domain domain;
@@ -224,13 +224,13 @@ public void testWeblogicLogSearch() throws Exception {
224224
* @throws Exception exception
225225
*/
226226
@Test
227-
public void testWLSLoggingExporter() throws Exception {
227+
public void testWlsLoggingExporter() throws Exception {
228228
Assume.assumeFalse(QUICKTEST);
229229
String testMethodName = new Object() {}.getClass().getEnclosingMethod().getName();
230230
logTestBegin(testMethodName);
231231

232232
// Download Weblogic logging exporter
233-
downloadWLSLoggingExporterJars();
233+
downloadWlsLoggingExporterJars();
234234
// Copy required resources to all wls server pods
235235
copyResourceFilesToAllPods();
236236

@@ -265,7 +265,7 @@ private static void verifyLoggingExpReady(String index) throws Exception {
265265
Assume.assumeNotNull(indexStatus);
266266
Assume.assumeNotNull(indexName);
267267

268-
if(!index.equalsIgnoreCase(kibanaIndexKey)) {
268+
if (!index.equalsIgnoreCase(kibanaIndexKey)) {
269269
// Add the logstash and wls index name to a Map
270270
testVarMap.put(index, indexName);
271271
}
@@ -278,16 +278,14 @@ private static void verifyLoggingExpReady(String index) throws Exception {
278278
String[] indexNameArr =
279279
indexName.split(System.getProperty("line.separator"));
280280

281-
for(int i = 0; i < indexStatusArr.length; i++) {
282-
logger.info("Health status of " + indexNameArr[i] +
283-
" is: " + healthStatusArr[i]);
284-
logger.info("Index status of " + indexNameArr[i] +
285-
" is: " + indexStatusArr[i]);
281+
for (int i = 0; i < indexStatusArr.length; i++) {
282+
logger.info("Health status of " + indexNameArr[i] + " is: " + healthStatusArr[i]);
283+
logger.info("Index status of " + indexNameArr[i] + " is: " + indexStatusArr[i]);
286284
// Verify that the health status of index
287285
Assume.assumeTrue(
288286
index + " is not ready!",
289-
healthStatusArr[i].trim().equalsIgnoreCase("yellow") ||
290-
healthStatusArr[i].trim().equalsIgnoreCase("green"));
287+
healthStatusArr[i].trim().equalsIgnoreCase("yellow")
288+
|| healthStatusArr[i].trim().equalsIgnoreCase("green"));
291289
// Verify that the index is open for use
292290
Assume.assumeTrue(index + " index is not open!",
293291
indexStatusArr[i].trim().equalsIgnoreCase("open"));
@@ -395,7 +393,7 @@ private String execSearchQuery(String queryCriteria, String index) throws Except
395393
return result.stdout();
396394
}
397395

398-
private void downloadWLSLoggingExporterJars() throws Exception {
396+
private void downloadWlsLoggingExporterJars() throws Exception {
399397
File loggingJatReposDir = new File(loggingExpArchiveLoc);
400398

401399
if (loggingJatReposDir.list().length == 0) {
@@ -455,8 +453,7 @@ private void copyResourceFilesToAllPods() throws Exception {
455453

456454
private void copyResourceFilesToOnePod(String serverName, String domainNS)
457455
throws Exception {
458-
String resourceDir =
459-
BaseTest.getProjectRoot() + "/integration-tests/src/test/resources";
456+
String resourceDir = BaseTest.getProjectRoot() + "/integration-tests/src/test/resources";
460457
String testResourceDir = resourceDir + "/loggingexporter";
461458
final String loggingYamlFile = "WebLogicLoggingExporter.yaml";
462459

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,10 @@ public void testTwoDomainsManagedByTwoOperators() throws Exception {
226226
if (!domainUidsToBeDeleted.equals("")) {
227227
logger.info("About to delete domains: " + domainUidsToBeDeleted);
228228
TestUtils.deleteWeblogicDomainResources(domainUidsToBeDeleted);
229-
if(domain1 != null) {
229+
if (domain1 != null) {
230230
TestUtils.verifyAfterDeletion(domain1);
231231
}
232-
if(domain2 != null) {
232+
if (domain2 != null) {
233233
TestUtils.verifyAfterDeletion(domain2);
234234
}
235235
}
@@ -312,11 +312,11 @@ public void testTwoDomainsManagedByOneOperatorSharingPV() throws Exception {
312312
if (!domainUidsToBeDeleted.equals("")) {
313313
logger.info("About to delete domains: " + domainUidsToBeDeleted);
314314
TestUtils.deleteWeblogicDomainResources(domainUidsToBeDeleted);
315-
if(domain1 != null) {
315+
if (domain1 != null) {
316316
TestUtils.verifyAfterDeletion(domain1);
317317
}
318-
if(domain2 != null) {
319-
TestUtils.verifyAfterDeletion(domain2);
318+
if (domain2 != null) {
319+
TestUtils.verifyAfterDeletion(domain2);
320320
}
321321
}
322322
}

0 commit comments

Comments
 (0)