forked from keycloak/keycloak
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: testsuite/integration-arquillian/tests/other/adapters/jboss/remote/pom.xml testsuite/integration-arquillian/tests/other/clean-start/pom.xml
- Loading branch information
Showing
34 changed files
with
815 additions
and
536 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
testsuite/integration-arquillian/servers/auth-server/jboss/common/keycloak-add-user.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[ { | ||
"realm" : "master", | ||
"users" : [ { | ||
"username" : "admin", | ||
"enabled" : true, | ||
"credentials" : [ { | ||
"type" : "password", | ||
"hashedSaltedValue" : "dqalJHLkWhUJZO/q6+z1fvXOohTcGCXcvoU8xCEyvTxGN4wmLx7DtyhKuefggh6Bkx1I2eBTEX4tiWggwyXMDw==", | ||
"salt" : "3fBAt5GAGGxFrV9fznpZHQ==", | ||
"hashIterations" : 100000, | ||
"algorithm" : "pbkdf2" | ||
} ], | ||
"realmRoles" : [ "admin" ] | ||
} ] | ||
} ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 64 additions & 1 deletion
65
testsuite/integration-arquillian/tests/other/adapters/jboss/remote/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,65 @@ | ||
# | ||
# Keycloak Adapter Tests - JBoss Remote | ||
|
||
## Performance Tests | ||
|
||
### Parameters | ||
|
||
* Warmup phase | ||
- `warmup.load` Load during warmup phase (# of clients). | ||
- `warmup.duration` Duration of warmup phase in seconds. | ||
* Measuremet iterations | ||
- `initial.load` Load for the initial measurement iteration (# of clients). | ||
- `load.increase` How many clients to add after each iteration. | ||
- `load.increase.rate` How many clients to add per second. | ||
- `measurement.duration` Duration of measurement iteration (in seconds). | ||
* Limits | ||
- `max.iterations` | ||
- `max.threads` | ||
* Other | ||
- `sleep.between.loops` Sleep period between scenario loops. | ||
|
||
### Generated Load | ||
|
||
Warmup phase and measurement iterations with load-increase phases in between. | ||
|
||
load | ||
|
||
^ | ||
│ | ||
│ / | ||
│ _________/ | ||
│ /| | | ||
│ / | | | ||
│ _________/ | | | ||
│ /| | | | | ||
│ / | | | | | ||
│ _________/ | | | | | ||
│ /│ | | | | | | ||
│ / | | | | | | | ||
│ _________/ | | | | | | | ||
│ /| | | | | | | | | ||
│ ____________/ | | | | | | | | | ||
│ /| | | | | | | | | | | ||
│/ | | | | | | | | | | | ||
└──|────────────|─|─────────|──|─────────|──|─────────|──|─────────|───────> time | ||
|
||
<--warmup--> <--it.1-> <--it.2-> <--it.3-> <--it.4-> | ||
|
||
|
||
### Login-Logout Test Scenario | ||
|
||
#### Collected Statistics | ||
|
||
- ACCESS_REQUEST_TIME | ||
- LOGIN_REQUEST_TIME | ||
- LOGIN_VERIFY_REQUEST_TIME | ||
- LOGOUT_REQUEST_TIME | ||
- LOGOUT_VERIFY_REQUEST_TIME | ||
|
||
#### Parameters | ||
|
||
* Limits | ||
- `max.login.time.average` Maximum accepted average value of LOGIN_REQUEST_TIME. | ||
- `max.logout.time.average` Maximum accepted average value of LOGOUT_REQUEST_TIME. | ||
- `max.timeout.percentage` Maximum accepted timeout percentage for all statistics. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
.../jboss/remote/src/test/java/org/keycloak/testsuite/performance/LoginLogoutParameters.java
This file was deleted.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
...ss/remote/src/test/java/org/keycloak/testsuite/performance/LoginLogoutTestParameters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.keycloak.testsuite.performance; | ||
|
||
/** | ||
* | ||
* @author tkyjovsk | ||
*/ | ||
public class LoginLogoutTestParameters { | ||
|
||
// Statistics | ||
public static final String ACCESS_REQUEST_TIME = "ACCESS_REQUEST"; | ||
public static final String LOGIN_REQUEST_TIME = "LOGIN_REQUEST"; | ||
public static final String LOGIN_VERIFY_REQUEST_TIME = "LOGIN_VERIFY_REQUEST"; | ||
public static final String LOGOUT_REQUEST_TIME = "LOGOUT_REQUEST"; | ||
public static final String LOGOUT_VERIFY_REQUEST_TIME = "LOGOUT_VERIFY_REQUEST"; | ||
|
||
// Limits | ||
public static final Integer MAX_LOGIN_TIME_AVERAGE = Integer.parseInt(System.getProperty("max.login.time.average", "500")); | ||
public static final Integer MAX_LOGOUT_TIME_AVERAGE = Integer.parseInt(System.getProperty("max.logout.time.average", "500")); | ||
public static final double MAX_TIMEOUT_PERCENTAGE = Double.parseDouble(System.getProperty("max.timeout.percentage", "0")); | ||
|
||
// Other | ||
public static final Integer PASSWORD_HASH_ITERATIONS = Integer.parseInt(System.getProperty("password.hash.iterations", "1")); | ||
|
||
public static boolean isMeasurementWithinLimits(PerformanceMeasurement measurement) { | ||
return isTimeoutPercentageWithinLimits(measurement) | ||
&& measurement.getStatistics().get(LOGIN_REQUEST_TIME).getAverage() < MAX_LOGIN_TIME_AVERAGE | ||
&& measurement.getStatistics().get(LOGOUT_REQUEST_TIME).getAverage() < MAX_LOGOUT_TIME_AVERAGE; | ||
} | ||
|
||
public static boolean isTimeoutPercentageWithinLimits(PerformanceMeasurement measurement) { | ||
boolean withinLimits = true; | ||
for (String statistic : measurement.getStatistics().keySet()) { | ||
withinLimits = withinLimits && measurement.getTimeoutPercentage(statistic) <= MAX_TIMEOUT_PERCENTAGE; | ||
} | ||
return withinLimits; | ||
} | ||
|
||
} |
Oops, something went wrong.