Skip to content

Commit befc686

Browse files
making changes after review
1 parent 656b056 commit befc686

File tree

4 files changed

+165
-264
lines changed

4 files changed

+165
-264
lines changed

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@ public void testCreateCoherenceDomainOnPvUsingWlst() throws Exception {
133133
testAppName, scriptName, BaseTest.getUsername(), BaseTest.getPassword(),
134134
appToDeploy, "dataCluster");
135135

136-
// Wait some time for deployment to get into Active state
137-
Thread.sleep(60 * 1000);
138-
139136
coherenceCacheTest();
140137

141138
testCompletedSuccessfully = true;
@@ -204,9 +201,6 @@ public void testCreateCoherenceDomainInImageUsingWlst() throws Exception {
204201
testAppName, scriptName, BaseTest.getUsername(), BaseTest.getPassword(),
205202
appToDeploy, "dataCluster");
206203

207-
// Wait some time for deployment to get into Active state
208-
Thread.sleep(60 * 1000);
209-
210204
coherenceCacheTest();
211205

212206
testCompletedSuccessfully = true;
@@ -234,9 +228,6 @@ private static void verifyServersStatus(Domain domain, String[] pods, String dom
234228
}
235229

236230
private void coherenceCacheTest() throws Exception {
237-
//Assume.assumeFalse(QUICKTEST);
238-
//String testMethodName = new Object() {}.getClass().getEnclosingMethod().getName();
239-
//logTestBegin(testMethodName);
240231

241232
String[] firstNameList = {"Frodo", "Samwise", "Bilbo", "peregrin", "Meriadoc", "Gandalf"};
242233
String[] secondNameList = {"Baggins", "Gamgee", "Baggins", "Took", "Brandybuck", "TheGrey"};
@@ -261,7 +252,6 @@ private void coherenceCacheTest() throws Exception {
261252
result = clearCache();
262253
logger.info("Cache is cleared and should be empty" + result.stdout());
263254

264-
//logger.info("SUCCESS - " + testMethodName);
265255
}
266256

267257
private ExecResult addDataToCache(String firstName, String secondName) throws Exception {

integration-tests/src/test/java/oracle/kubernetes/operator/utils/TestUtils.java

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,50 +1712,12 @@ public static void buildDeployCoherenceAppInPod(
17121712
// Create app dir in the admin pod
17131713
kubectlexec(adminServerPod, domainNS, mkdirCmd.toString());
17141714

1715-
/*
1716-
// Create gar directory under the app dir
1717-
mkdirCmd = new StringBuffer(" -- bash -c 'mkdir -p ");
1718-
mkdirCmd.append(appLocationInPod + "/gar'");
1719-
kubectlexec(adminServerPod, domainNS, mkdirCmd.toString());
1720-
1721-
// Create ear directory under the app dir
1722-
mkdirCmd = new StringBuffer(" -- bash -c 'mkdir -p ");
1723-
mkdirCmd.append(appLocationInPod + "/ear'");
1724-
kubectlexec(adminServerPod, domainNS, mkdirCmd.toString());
1725-
1726-
// Create war directory under the app dir if war directory exists in the host
1727-
if (new File(appLocationOnHost+"/war").exists()) {
1728-
// Create ear directory under the app dir
1729-
mkdirCmd = new StringBuffer(" -- bash -c 'mkdir -p ");
1730-
mkdirCmd.append(appLocationInPod + "/war'");
1731-
kubectlexec(adminServerPod, domainNS, mkdirCmd.toString());
1732-
}
1733-
1734-
// Create META-INF in the gar dir
1735-
mkdirCmd = new StringBuffer(" -- bash -c 'mkdir -p ");
1736-
mkdirCmd.append(appLocationInPod + "/gar/META-INF'");
1737-
kubectlexec(adminServerPod, domainNS, mkdirCmd.toString());
1738-
1739-
// Create META-INF in the ear dir
1740-
mkdirCmd = new StringBuffer(" -- bash -c 'mkdir -p ");
1741-
mkdirCmd.append(appLocationInPod + "/ear/META-INF'");
1742-
kubectlexec(adminServerPod, domainNS, mkdirCmd.toString());
1743-
*/
1744-
17451715
// Copy shell script to the admin pod
17461716
copyFileViaCat(scriptPathOnHost, scriptPathInPod, adminServerPod, domainNS);
17471717

17481718
// Copy all App files to the admin pod
17491719
copyAppFilesToPod(appLocationOnHost, appLocationInPod, adminServerPod, domainNS);
17501720

1751-
/*
1752-
// Copy all App files to the admin pod
1753-
copyAppFilesToPod(
1754-
appLocationOnHost + "/gar", appLocationInPod + "/gar", adminServerPod, domainNS);
1755-
copyAppFilesToPod(
1756-
appLocationOnHost + "/ear", appLocationInPod + "/ear", adminServerPod, domainNS);
1757-
*/
1758-
17591721
logger.info("Creating WebService and WebService Servlet Client Applications");
17601722

17611723
// Run the script to build WAR, EAR or JAR file and deploy the App in the admin pod
Lines changed: 93 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<!-- Copyright 2019, Oracle Corporation and/or its affiliates. All rights reserved.
2-
Licensed under the Universal Permissive License v 1.0 as shown at
3-
http://oss.oracle.com/licenses/upl.-->
1+
// Copyright 2019, Oracle Corporation and/or its affiliates. All rights reserved.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at
3+
// http://oss.oracle.com/licenses/upl.
44

55
package com.examples.pof;
66

@@ -10,120 +10,101 @@
1010

1111
import com.tangosol.util.Base;
1212

13-
import java.io.IOException;
14-
1513
import java.util.Date;
1614

1715
/**
18-
* * @author Sanjay Mantoor *
1916
* POF serialization implementation for coherence cache
2017
*/
2118
public class Contact implements PortableObject {
2219

23-
private String m_sFirstName;
24-
private String m_sLastName;
25-
26-
public Contact() {
27-
28-
}
29-
30-
public Contact(String firstName, String lastName) {
31-
m_sFirstName = firstName;
32-
m_sLastName = lastName;
33-
}
34-
35-
/**
36-
* * Return the first name. * * @return the first name
37-
*/
38-
public String getFirstName() {
39-
return m_sFirstName;
40-
}
41-
42-
/**
43-
* * Set the first name. * * @param sFirstName the first name
44-
*/
45-
public void setFirstName(String sFirstName) {
46-
m_sFirstName = sFirstName;
47-
}
48-
49-
/**
50-
* * Return the last name. * * @return the last name
51-
*/
52-
public String getLastName() {
53-
return m_sLastName;
54-
}
55-
56-
/**
57-
* * Set the last name. * * @param sLastName the last name
58-
*/
59-
public void setLastName(String sLastName) {
60-
m_sLastName = sLastName;
61-
}
62-
63-
/**
64-
* * {@inheritDoc}
65-
*/
66-
public void readExternal(PofReader reader) throws IOException {
67-
m_sFirstName = reader.readString(FIRSTNAME);
68-
m_sLastName = reader.readString(LASTNAME);
69-
}
70-
71-
/**
72-
* * {@inheritDoc}
73-
*/
74-
public void writeExternal(PofWriter writer) throws IOException {
75-
writer.writeString(FIRSTNAME, m_sFirstName);
76-
writer.writeString(LASTNAME, m_sLastName);
77-
}
78-
79-
/**
80-
* * {@inheritDoc}
81-
*/
82-
public String toString() {
83-
StringBuilder sb = new StringBuilder(getFirstName()).append(" ").append(getLastName());
84-
return sb.toString();
85-
}
86-
87-
/**
88-
* * Returns the hashCode of this {@link Contact}. * * @return the hashCode
89-
* of this {@link Contact}
90-
*/
91-
@Override
92-
public int hashCode() {
93-
final int prime = 31;
94-
int result = 1;
95-
result = prime * result + ((m_sFirstName == null) ? 0 : m_sFirstName.hashCode());
96-
result = prime * result + ((m_sLastName == null) ? 0 : m_sLastName.hashCode());
97-
return result;
98-
}
99-
100-
/**
101-
* * Compares this {@link Contact} with another. * * @param obj
102-
* {@link Contact} to compare to * * @return if the contacts are equal
103-
*/
104-
@Override
105-
public boolean equals(Object obj) {
106-
if (this == obj) {
107-
return true;
108-
}
109-
110-
if (obj == null) {
111-
return false;
112-
}
113-
114-
Contact that = (Contact) obj;
115-
116-
return Base.equals(that.getFirstName(), getFirstName()) && Base.equals(that.getLastName(), getLastName());
117-
}
118-
119-
/**
120-
* * The POF index for the FirstName property.
121-
*/
122-
public static final int FIRSTNAME = 0;
123-
124-
/**
125-
* * The POF index for the LastName property.
126-
*/
127-
public static final int LASTNAME = 1;
128-
20+
// The POF index for the FirstName property.
21+
public static final int FIRSTNAME = 0;
22+
23+
// The POF index for the LastName property.
24+
public static final int LASTNAME = 1;
25+
26+
private String m_sFirstName;
27+
private String m_sLastName;
28+
29+
public Contact() {
30+
}
31+
32+
public Contact(String firstName, String lastName) {
33+
m_sFirstName = firstName;
34+
m_sLastName = lastName;
35+
}
36+
37+
/**
38+
* Return the first name.
39+
*/
40+
public String getFirstName() {
41+
return m_sFirstName;
42+
}
43+
44+
/**
45+
* Set the first name.
46+
* @param sFirstName the first name
47+
*/
48+
public void setFirstName(String sFirstName) {
49+
m_sFirstName = sFirstName;
50+
}
51+
52+
/**
53+
* Return the last name.
54+
*/
55+
public String getLastName() {
56+
return m_sLastName;
57+
}
58+
59+
/**
60+
* Set the last name
61+
* @param sLastName the last name
62+
*/
63+
public void setLastName(String sLastName) {
64+
m_sLastName = sLastName;
65+
}
66+
67+
public void readExternal(PofReader reader) throws IOException {
68+
m_sFirstName = reader.readString(FIRSTNAME);
69+
m_sLastName = reader.readString(LASTNAME);
70+
}
71+
72+
public void writeExternal(PofWriter writer) throws IOException {
73+
writer.writeString(FIRSTNAME, m_sFirstName);
74+
writer.writeString(LASTNAME, m_sLastName);
75+
}
76+
77+
public String toString() {
78+
StringBuilder sb = new StringBuilder(getFirstName()).append(" ").append(getLastName());
79+
return sb.toString();
80+
}
81+
82+
/**
83+
* Returns the hashCode of the Contact
84+
*/
85+
@Override
86+
public int hashCode() {
87+
final int prime = 31;
88+
int result = 1;
89+
90+
result = prime * result + ((m_sFirstName == null) ? 0 : m_sFirstName.hashCode());
91+
result = prime * result + ((m_sLastName == null) ? 0 : m_sLastName.hashCode());
92+
return result;
93+
}
94+
95+
/**
96+
* Compares this Contact with another
97+
* @param obj
98+
*/
99+
@Override
100+
public boolean equals(Object obj) {
101+
if (this == obj) {
102+
return true;
103+
}
104+
if (obj == null) {
105+
return false;
106+
}
107+
Contact that = (Contact) obj;
108+
return Base.equals(that.getFirstName(), getFirstName()) && Base.equals(that.getLastName(), getLastName());
109+
}
129110
}

0 commit comments

Comments
 (0)