Skip to content

Commit

Permalink
Merge pull request #30269 from jonhawkes/bigger-cit
Browse files Browse the repository at this point in the history
Increase clientInactivityTimeout for multi-process recovery tests
  • Loading branch information
jonhawkes authored Nov 22, 2024
2 parents 600fde7 + 0472c08 commit f11c3cd
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.junit.Rule;
import org.junit.rules.TestName;

import com.ibm.tx.jta.ut.util.XAResourceImpl;
import com.ibm.websphere.simplicity.log.Log;

import componenttest.topology.impl.LibertyServer;
Expand Down Expand Up @@ -77,6 +78,14 @@ private static URI appendUri(URI oldUri, String appendQuery) throws URISyntaxExc
return newUri;
}

public static void deleteStateFiles(LibertyServer... servers) throws Exception {
final String stateFile = XAResourceImpl.getStateFile().getName();
Log.info(WSATTest.class, "deleteStateFiles", stateFile);
for (LibertyServer server : servers) {
server.deleteFileFromLibertyServerRoot(stateFile);
}
}

public static void callClearResourcesServlet(String app, LibertyServer... servers) throws Exception{
final String method = "callClearResourcesServlet";
int expectedConnectionCode = HttpURLConnection.HTTP_OK;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1632,4 +1632,8 @@ public static synchronized void loadState(File stateFile) {
setStateFile(stateFile);
loadState();
}

public static File getStateFile() {
return STATE_FILE;
}
}
10 changes: 7 additions & 3 deletions dev/com.ibm.ws.wsat.recovery_fat.lps/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/

dependencies {
requiredLibs (project(":com.ibm.ws.transaction.fat.util")) {
configurations {
requiredLibs {
transitive = false
}
}

dependencies {
requiredLibs project(":com.ibm.ws.transaction.test.util"),
project(":com.ibm.ws.transaction.fat.util")
}

addRequiredLibraries.dependsOn addJakartaTransformer
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public static void beforeTests() throws Exception {

@Before
public void beforeTest() throws Exception {
WSATTest.deleteStateFiles(server1, server2);
FATUtils.startServers(server1, server2);
WSATTest.callClearResourcesServlet("recoveryServer", server1, server2);
}

@After
Expand Down
2 changes: 1 addition & 1 deletion dev/com.ibm.ws.wsat.recovery_fat.multi.1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/

configurations {
requiredLibs {
transitive = false
Expand All @@ -20,6 +19,7 @@ configurations {
// Define G:A:V coordinates of each dependency
dependencies {
requiredLibs project(":com.ibm.ws.wsat.recovery_fat.lps"),
project(":com.ibm.ws.transaction.test.util"),
project(":com.ibm.ws.transaction.fat.util")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,11 @@ public void run(LibertyServer s) throws Exception {
ShrinkHelper.exportDropinAppToServer(server1, serverApp);
ShrinkHelper.exportDropinAppToServer(server2, serverApp);
}
@Before

@Before
public void before() throws Exception {
Log.info(MultiRecoveryTest.class, "before", "");
WSATTest.deleteStateFiles(server1, server2);
FATUtils.startServers(runner, server1, server2);

WSATTest.callClearResourcesServlet(recoveryServer, server1, server2);
}

@After
Expand Down
3 changes: 1 addition & 2 deletions dev/com.ibm.ws.wsat.recovery_fat.multi.2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/

configurations {
requiredLibs {
transitive = false
}
}

// Define G:A:V coordinates of each dependency
dependencies {
requiredLibs project(":com.ibm.ws.wsat.recovery_fat.lps"),
project(":com.ibm.ws.wsat.recovery_fat.multi.1"),
project(":com.ibm.ws.transaction.test.util"),
project(":com.ibm.ws.transaction.fat.util")
}

Expand Down
3 changes: 1 addition & 2 deletions dev/com.ibm.ws.wsat.recovery_fat.multi.3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/

configurations {
requiredLibs {
transitive = false
}
}

// Define G:A:V coordinates of each dependency
dependencies {
requiredLibs project(":com.ibm.ws.wsat.recovery_fat.lps"),
project(":com.ibm.ws.wsat.recovery_fat.multi.1"),
project(":com.ibm.ws.transaction.test.util"),
project(":com.ibm.ws.transaction.fat.util")
}

Expand Down
3 changes: 1 addition & 2 deletions dev/com.ibm.ws.wsat.recovery_fat.multi.4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/

configurations {
requiredLibs {
transitive = false
}
}

// Define G:A:V coordinates of each dependency
dependencies {
requiredLibs project(":com.ibm.ws.wsat.recovery_fat.lps"),
project(":com.ibm.ws.wsat.recovery_fat.multi.1"),
project(":com.ibm.ws.transaction.test.util"),
project(":com.ibm.ws.transaction.fat.util")
}

Expand Down
3 changes: 1 addition & 2 deletions dev/com.ibm.ws.wsat.recovery_fat.multi.5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/

configurations {
requiredLibs {
transitive = false
}
}

// Define G:A:V coordinates of each dependency
dependencies {
requiredLibs project(":com.ibm.ws.wsat.recovery_fat.lps"),
project(":com.ibm.ws.wsat.recovery_fat.multi.1"),
project(":com.ibm.ws.transaction.test.util"),
project(":com.ibm.ws.transaction.fat.util")
}

Expand Down
3 changes: 1 addition & 2 deletions dev/com.ibm.ws.wsat.recovery_fat.multi.6/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/

configurations {
requiredLibs {
transitive = false
}
}

// Define G:A:V coordinates of each dependency
dependencies {
requiredLibs project(":com.ibm.ws.wsat.recovery_fat.lps"),
project(":com.ibm.ws.wsat.recovery_fat.multi.1"),
project(":com.ibm.ws.transaction.test.util"),
project(":com.ibm.ws.transaction.fat.util")
}

Expand Down
3 changes: 1 addition & 2 deletions dev/com.ibm.ws.wsat.recovery_fat.multi.7/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/

configurations {
requiredLibs {
transitive = false
}
}

// Define G:A:V coordinates of each dependency
dependencies {
requiredLibs project(":com.ibm.ws.wsat.recovery_fat.lps"),
project(":com.ibm.ws.wsat.recovery_fat.multi.1"),
project(":com.ibm.ws.transaction.test.util"),
project(":com.ibm.ws.transaction.fat.util")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<transaction
backendURL="http://localhost:${bvt.prop.HTTP_secondary}"
clientInactivityTimeout="15s"
clientInactivityTimeout="30s"
heuristicRetryInterval="10"
heuristicRetryLimit="10"
leaseExpiryThreshold="5"
Expand Down
4 changes: 1 addition & 3 deletions dev/com.ibm.ws.wsat.recovery_fat.multi.8.ee10/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,16 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/

configurations {
requiredLibs {
transitive = false
}
}

// Define G:A:V coordinates of each dependency
dependencies {
requiredLibs project(":com.ibm.ws.wsat.recovery_fat.lps"),
project(":com.ibm.ws.wsat.recovery_fat.multi.1"),
project(":com.ibm.ws.wsat.recovery_fat.multi.8"),
project(":com.ibm.ws.transaction.test.util"),
project(":com.ibm.ws.transaction.fat.util")
}

Expand Down
3 changes: 1 addition & 2 deletions dev/com.ibm.ws.wsat.recovery_fat.multi.8/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/

configurations {
requiredLibs {
transitive = false
}
}

// Define G:A:V coordinates of each dependency
dependencies {
requiredLibs project(":com.ibm.ws.wsat.recovery_fat.lps"),
project(":com.ibm.ws.wsat.recovery_fat.multi.1"),
project(":com.ibm.ws.transaction.test.util"),
project(":com.ibm.ws.transaction.fat.util")
}

Expand Down
3 changes: 1 addition & 2 deletions dev/com.ibm.ws.wsat.recovery_fat.multi.9/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/

configurations {
requiredLibs {
transitive = false
}
}

// Define G:A:V coordinates of each dependency
dependencies {
requiredLibs project(":com.ibm.ws.wsat.recovery_fat.lps"),
project(":com.ibm.ws.wsat.recovery_fat.multi.1"),
project(":com.ibm.ws.transaction.test.util"),
project(":com.ibm.ws.transaction.fat.util")
}

Expand Down

0 comments on commit f11c3cd

Please sign in to comment.