Skip to content

Commit bea42f9

Browse files
committed
Synced up with develop branch
1 parent 454807a commit bea42f9

File tree

4 files changed

+24
-16
lines changed

4 files changed

+24
-16
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public void testRepickPrimary() throws Exception {
150150

151151
// Restore test env
152152
// Wait some time for ms pod to become ready
153-
Thread.sleep(30 * 1000);
153+
// Thread.sleep(30 * 1000);
154154
TestUtils.checkPodReady(domainUid + "-" + primaryServName1, domainNS);
155155

156156
logger.info(
@@ -210,7 +210,7 @@ public void testHttpSessionMigr() throws Exception {
210210

211211
// Restore test env
212212
// Wait some time for ms pod to become ready
213-
Thread.sleep(30 * 1000);
213+
// Thread.sleep(30 * 1000);
214214
TestUtils.checkPodReady(domainUid + "-" + primaryServName1, domainNS);
215215

216216
logger.info("SUCCESS - " + testMethodName + ". HTTP session state is migrated!");

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

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,17 +1597,18 @@ public void restartManagedServerUsingServerStartPolicy(String msName) throws Exc
15971597
}
15981598

15991599
/**
1600-
* Run the shell script to build .war file and deploy the App in the admin pod
1600+
* Run the shell script to build WAR, EAR or JAR file and deploy the App in the admin pod
16011601
*
16021602
* @param webappName - Web App Name to be deployed
1603-
* @param scriptName - a shell script to build .war file and deploy the App in the admin pod
1603+
* @param scriptName - a shell script to build WAR, EAR or JAR file and deploy the App in the
1604+
* admin pod
16041605
* @param archiveExt - archive extention
16051606
* @param infoDirNames - archive information dir location
16061607
* @param username - weblogic user name
16071608
* @param password - weblogc password
16081609
* @throws Exception
16091610
*/
1610-
private void callShellScriptToBuildWarDeployAppInPod(
1611+
private void callShellScriptToBuildDeployAppInPod(
16111612
String webappName,
16121613
String scriptName,
16131614
String archiveExt,
@@ -1678,10 +1679,11 @@ private void callShellScriptToBuildWarDeployAppInPod(
16781679

16791680
/**
16801681
* Create dir to save Web App files Copy the shell script file and all App files over to the admin
1681-
* pod Run the shell script to build .war file and deploy the App in the admin pod
1682+
* pod Run the shell script to build WAR, EAR or JAR file and deploy the App in the admin pod
16821683
*
16831684
* @param appName - Java App name to be deployed
1684-
* @param scriptName - a shell script to build .war file and deploy the App in the admin pod
1685+
* @param scriptName - a shell script to build WAR, EAR or JAR file and deploy the App in the
1686+
* admin pod
16851687
* @param username - weblogic user name
16861688
* @param password - weblogc password
16871689
* @param args - by default, a WAR file is created for a Web App and a EAR file is created for EJB
@@ -1698,9 +1700,12 @@ public void buildDeployJavaAppInPod(
16981700
String scriptPathOnHost = BaseTest.getAppLocationOnHost() + "/" + scriptName;
16991701
String scriptPathInPod = BaseTest.getAppLocationInPod() + "/" + scriptName;
17001702

1703+
// Default velues to build archive file
17011704
final String initInfoDirName = "WEB-INF";
17021705
String archiveExt = "war";
17031706
String infoDirName = initInfoDirName;
1707+
1708+
// Get archive info dir name
17041709
File appFiles = new File(appLocationOnHost);
17051710

17061711
String[] subDirArr =
@@ -1714,6 +1719,7 @@ public boolean accept(File dir, String name) {
17141719

17151720
List<String> subDirList = Arrays.asList(subDirArr);
17161721

1722+
// Check archive file type
17171723
if (!subDirList.contains(infoDirName)) {
17181724
infoDirName = "META-INF";
17191725
// Create .ear file or .jar file for EJB
@@ -1722,10 +1728,9 @@ public boolean accept(File dir, String name) {
17221728

17231729
logger.info("Build and deploy: " + appName + "." + archiveExt + " in the admin pod");
17241730

1731+
// Create app dir in the admin pod
17251732
StringBuffer mkdirCmd = new StringBuffer(" -- bash -c 'mkdir -p ");
17261733
mkdirCmd.append(appLocationInPod).append("/" + infoDirName + "'");
1727-
1728-
// Create app dir in the pod
17291734
TestUtils.kubectlexec(adminServerPod, domainNS, mkdirCmd.toString());
17301735

17311736
// Copy shell script to the pod
@@ -1734,8 +1739,8 @@ public boolean accept(File dir, String name) {
17341739
// Copy all App files to the admin pod
17351740
TestUtils.copyAppFilesToPod(appLocationOnHost, appLocationInPod, adminServerPod, domainNS);
17361741

1737-
// Run the script to build .war file and deploy the App in the pod
1738-
callShellScriptToBuildWarDeployAppInPod(
1742+
// Run the script to build WAR, EAR or JAR file and deploy the App in the admin pod
1743+
callShellScriptToBuildDeployAppInPod(
17391744
appName, scriptName, archiveExt, infoDirName, username, password);
17401745
}
17411746
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ public static ExecResult kubectlexecNoCheck(String podName, String namespace, St
447447
* Copy all App files to the k8s pod
448448
*
449449
* @param appLocationOnHost - App location on the local host
450-
* @param appLocationInPod - App location on the lk8s pod
450+
* @param appLocationInPod - App location on the k8s pod
451451
* @param podName - the k8s pod name
452452
* @param namespace - namespace the k8s pod is in
453453
* @throws Exception

integration-tests/src/test/resources/apps/httpsessionreptestapp/CounterServlet.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44

55
package apps.httpsessionreptestapp;
66

7-
import java.io.*;
8-
import javax.servlet.*;
9-
import javax.servlet.http.*;
7+
import java.io.IOException;
8+
import java.io.PrintWriter;
9+
import javax.servlet.http.HttpServlet;
10+
import javax.servlet.http.HttpServletRequest;
11+
import javax.servlet.http.HttpServletResponse;
12+
import javax.servlet.http.HttpSession;
13+
import javax.servlet.ServletException;
1014
import weblogic.servlet.internal.session.RSID;
1115
import weblogic.servlet.internal.MembershipControllerImpl;
1216
import weblogic.servlet.spi.WebServerRegistry;
13-
import java.util.Enumeration;
1417

1518
/**
1619
* Simple HTTP servlet class for a client to

0 commit comments

Comments
 (0)