Remove unstable ImportDistTest.testImportLargeUserCount test on CPU-constrainted agents (#45836)
Some checks failed
Keycloak CI / Check conditional workflows and jobs (push) Has been cancelled
CodeQL / Check conditional workflows and jobs (push) Has been cancelled
Keycloak Documentation / Check conditional workflows and jobs (push) Has been cancelled
Keycloak Guides / Check conditional workflows and jobs (push) Has been cancelled
Keycloak JavaScript CI / Check conditional workflows and jobs (push) Has been cancelled
Keycloak Operator CI / Check conditional workflows and jobs (push) Has been cancelled
Keycloak CI / Build (push) Has been cancelled
Keycloak CI / Base UT (push) Has been cancelled
Keycloak CI / Base IT (push) Has been cancelled
Keycloak CI / Adapter IT (push) Has been cancelled
Keycloak CI / Adapter IT Strict Cookies (push) Has been cancelled
Keycloak CI / Quarkus UT (push) Has been cancelled
Keycloak CI / Quarkus IT (push) Has been cancelled
Keycloak CI / Java Distribution IT (push) Has been cancelled
Keycloak CI / Login Theme v1 tests (push) Has been cancelled
Keycloak CI / Volatile Sessions IT (push) Has been cancelled
Keycloak CI / External Infinispan IT (push) Has been cancelled
Keycloak CI / AuroraDB IT (push) Has been cancelled
Keycloak CI / Store IT (push) Has been cancelled
Keycloak CI / Store IT (additional) (push) Has been cancelled
Keycloak CI / Store Model Tests (push) Has been cancelled
Keycloak CI / Clustering IT (push) Has been cancelled
Keycloak CI / FIPS UT (push) Has been cancelled
Keycloak CI / FIPS IT (push) Has been cancelled
Keycloak CI / Forms IT (push) Has been cancelled
Keycloak CI / WebAuthn IT (push) Has been cancelled
Keycloak CI / SSSD (push) Has been cancelled
Keycloak CI / Migration Tests (push) Has been cancelled
Keycloak CI / Test Framework (push) Has been cancelled
Keycloak CI / Base IT (new) (push) Has been cancelled
Keycloak CI / Cluster Compatibility Tests (push) Has been cancelled
Keycloak CI / Status Check - Keycloak CI (push) Has been cancelled
CodeQL / CodeQL Java (push) Has been cancelled
CodeQL / CodeQL JavaScript (push) Has been cancelled
CodeQL / CodeQL TypeScript (push) Has been cancelled
CodeQL / CodeQL GitHub Actions (push) Has been cancelled
CodeQL / Status Check - CodeQL (push) Has been cancelled
Keycloak Documentation / Build (push) Has been cancelled
Keycloak Documentation / External links check (push) Has been cancelled
Keycloak Documentation / Status Check - Keycloak Documentation (push) Has been cancelled
Keycloak Guides / Build (push) Has been cancelled
Keycloak Guides / Status Check - Keycloak Guides (push) Has been cancelled
Keycloak JavaScript CI / Build Keycloak (push) Has been cancelled
Keycloak JavaScript CI / Admin Client (push) Has been cancelled
Keycloak JavaScript CI / UI Shared (push) Has been cancelled
Keycloak JavaScript CI / Account UI (push) Has been cancelled
Keycloak JavaScript CI / Admin UI (push) Has been cancelled
Keycloak JavaScript CI / Account UI E2E (push) Has been cancelled
Keycloak JavaScript CI / Admin UI E2E (push) Has been cancelled
Keycloak JavaScript CI / Status Check - Keycloak JavaScript CI (push) Has been cancelled
Keycloak Operator CI / Build distribution (push) Has been cancelled
Keycloak Operator CI / Test local apiserver (push) Has been cancelled
Keycloak Operator CI / Test remote (push) Has been cancelled
Keycloak Operator CI / Test OLM installation (push) Has been cancelled
Keycloak Operator CI / Status Check - Keycloak Operator CI (push) Has been cancelled

Closes #45831

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
This commit is contained in:
Martin Bartoš 2026-01-29 08:34:19 +01:00 committed by GitHub
parent 873455f605
commit 0a973293bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,13 +18,7 @@
package org.keycloak.it.cli.dist;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Tag;
@ -72,53 +66,4 @@ public class ImportDistTest {
cliResult.assertError("Must specify either --dir or --file options.");
}
@Test
void testImportLargeUserCount(KeycloakDistribution dist) throws Exception {
File dir = new File("target");
CLIResult cliResult = dist.run("export", "--realm=master", "--dir=" + dir.getAbsolutePath());
cliResult.assertMessage("Export of realm 'master' requested.");
cliResult.assertMessage("Export finished successfully");
createUserFile(dir.getAbsolutePath());
ExecutorService ex = Executors.newFixedThreadPool(1);
Future<CLIResult> result = ex.submit(() -> dist.run("import", "--dir=" + dir.getAbsolutePath()));
try {
cliResult = result.get(40, TimeUnit.SECONDS);
cliResult.assertMessage("Realm 'master' imported");
cliResult.assertMessage("Import finished successfully");
cliResult.assertMessage("master-users-0.json");
} finally {
ex.shutdownNow();
}
}
void createUserFile(String dir) throws IOException {
FileWriter writer = new FileWriter(dir + "/master-users-0.json");
writer.write("{\n" + " \"realm\" : \"master\",\n" + " \"users\" : [\n");
for (int i = 0; i < 10000; i++) {
if (i > 0) {
writer.write("\n,");
}
writer.write("{\n"
+ " \"id\" : \""+UUID.randomUUID()+"\",\n"
+ " \"username\" : \"bob"+i+"\",\n"
+ " \"emailVerified\" : false,\n"
+ " \"createdTimestamp\" : 1741358612691,\n"
+ " \"enabled\" : true,\n"
+ " \"totp\" : false,\n"
+ " \"credentials\" : [ ],\n"
+ " \"disableableCredentialTypes\" : [ ],\n"
+ " \"requiredActions\" : [ ],\n"
+ " \"realmRoles\" : [ ],\n"
+ " \"notBefore\" : 0,\n"
+ " \"groups\" : [ ]\n"
+ " }");
}
writer.write(" ]\n" + "}");
writer.close();
}
}