[ST] Enable AuthST, fix several tests, performance improvements - #2776
[ST] Enable AuthST, fix several tests, performance improvements#2776jankalinic wants to merge 13 commits into
Conversation
e535e24 to
a81c0fa
Compare
|
/systemtests run --help |
ℹ️ Systemtests Help ℹ️You can run system tests with the following parameters:
Note: Use either Example usage:/systemtests run --profile=regression --env=MY_ENV=one;SECOND=two
/systemtests run --testcase=TopicST --install-type=olm --retry-count=3 |
|
/systemtests run --testcase=AuthST --install-type=olm --retry-count=2 |
c2a999a to
ff51014
Compare
|
/systemtests run --testcase=AuthST --install-type=olm --retry-count=2 |
1 similar comment
|
/systemtests run --testcase=AuthST --install-type=olm --retry-count=2 |
|
@jankalinic I'm looking into this. I may expand the scope to make sure all of the tests are running OK. |
|
Thank you @MikeEdgar. Feel free to modify or decide the future of this PR. |
Signed-off-by: jkalinic <jkalinic@redhat.com>
Signed-off-by: jkalinic <jkalinic@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
ff51014 to
b378bd5
Compare
| --driver=${MINIKUBE_DRIVER:-kvm2} \ | ||
| --cpus=${MINIKUBE_CPU_COUNT:-6} \ | ||
| --memory=${MINIKUBE_MEMORY:-16384} \ | ||
| --disk-size=${MINIKUBE_DISK_SIZE:-50g} \ |
There was a problem hiding this comment.
The default disk allocation in minikube is insufficient for the Kafka Connect image build process.
There was a problem hiding this comment.
This change has no effect in GitHub actions, but is useful for local testing.
| if (method.trySetAccessible()) { | ||
| method.invoke(testMethodContext.getRequiredTestInstance()); | ||
| } else { | ||
| throw new IllegalStateException("Unable to access @SetupTestBucket method " + method); | ||
| } |
There was a problem hiding this comment.
This allows us to keep the test classes as package-private (JUnit best practice) with minimal fuss.
| .setName(STDOUT) | ||
| .setLayout(PatternLayout.newBuilder() | ||
| .withPattern("%d{yyyy-MM-dd HH:mm:ss}{GMT} [%thread] %highlight{%-5p} [%c{1}:%L] %m%n") | ||
| .setPattern("%d{yyyy-MM-dd HH:mm:ss}{GMT} [%thread] %highlight{%-5p} [%c{1}:%L] %m%n") |
There was a problem hiding this comment.
These with methods are deprecated in favor of the set equivalents.
| maybeCreateCatalogSource(); | ||
|
|
||
| String newVersion = Environment.getConsoleOperatorVersion(); | ||
| String newVersion = Environment.getConsoleOperatorVersion(String::toLowerCase); |
There was a problem hiding this comment.
The version from the POM needs to be lower-cased for the OLM upgrade where the images and OLM artifacts use lowercase -snapshot as the suffix.
| } | ||
|
|
||
| private static KafkaClients buildClients(String namespace, String kafkaName, String kafkaUser, String topicName, int messageCount) { | ||
| return new KafkaClientsBuilder() |
There was a problem hiding this comment.
I think we can (over time) migrate the KafkaClients and Strimzi kafka client image Jobs to just use the Kafka Admin, Consumer, and Producer clients instead. It's significantly faster and minimizes the number of moving parts in the tests.
| } | ||
| } | ||
|
|
||
| public static CompletableFuture<Void> runAsyncWithContext(Runnable runnable) { |
There was a problem hiding this comment.
These methods allow us to run more of the test setup concurrently on worker threads while using the same test context. The Kubetest4j libraries relies on ThreadLocal a lot, so copying the context across threads is necessary.
| clusterName, | ||
| KafkaNamingUtils.kafkaUserName(clusterName), | ||
| Admin::create)) { | ||
| Wait.until("Groups deleted", 2_000, 120_000, () -> { |
There was a problem hiding this comment.
This long timeout is needed because the test clients Job appears to not call close on consumers. Only after a timeout does Kafka transition the groups from Stable to Empty, required for deletion. This won't be needed if/when we migrated to just using Producers/Consumers in-process.
|
/systemtests run --install-type=olm |
Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
| LOGGER.info("CONNECT_DEPLOY_CONCURRENT is false, deploying {} and {} sequentially", KAFKA_CONNECT_SRC_NAME, KAFKA_CONNECT_SINK_NAME); | ||
| connect = srcConn.thenComposeAsync(runComposableAsyncWithContext(deployConnectSink)); |
There was a problem hiding this comment.
Apparently, GitHub runners do not have enough disk space for the concurrent connect image builds.
| consoleOperatorSetup.setInstallConfig(olmConfig); | ||
| LOGGER.info("Installing Console Operator via OLM into namespace '{}'", Constants.CO_NAMESPACE); | ||
| consoleOperatorSetup.install(false); | ||
| consoleOperatorSetup.install(true); |
There was a problem hiding this comment.
When this test runs with other test classes, any previously-installed operator needs to be removed first, false -> true
| }); | ||
| } | ||
|
|
||
| public static String getClusterDomain() { |
There was a problem hiding this comment.
This reworks cluster domain lookup now respects CONSOLE_CLUSTER_DOMAIN primarily, then if not set it will derive from the OCP base domain as before (if OpenShift), or try to use the Kubernetes master URL's IP address to construct a .nip.io domain. This should help in local environments where, for example, minikube's IP is changing each time the cluster is created.
|
/systemtests run --install-type=olm |
Signed-off-by: Michael Edgar <medgar@redhat.com>
Signed-off-by: Michael Edgar <medgar@redhat.com>
|
/systemtests run --install-type=olm |
|
✅ Systemtests run finished - success ✅Test Summary:
Used parameters:
|
|
@jankalinic please take a look next week and let me know if I've done anything objectionable with this. Aside from make some of the tests pass, this PR now has some performance improvements and a start to migrating away from the kafka clients jobs to just using the Kafka clients directly. |



No description provided.