Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert parallelization of some UT/IT tests which seems ot be breaking the CI #4946

Merged
merged 1 commit into from
May 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
import io.strimzi.operator.common.operator.resource.SecretOperator;
import io.strimzi.test.TestUtils;

import io.strimzi.test.annotations.ParallelSuite;
import io.strimzi.test.annotations.ParallelTest;
import io.vertx.core.Future;
import io.vertx.core.Promise;
import io.vertx.core.Vertx;
Expand All @@ -43,6 +41,7 @@
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor;

Expand Down Expand Up @@ -90,7 +89,6 @@
import static org.mockito.Mockito.when;

@ExtendWith(VertxExtension.class)
@ParallelSuite
public class CertificateRenewalTest {

public static final String NAMESPACE = "test";
Expand Down Expand Up @@ -252,7 +250,7 @@ private X509Certificate getCertificateFromTrustStore(String alias, Map<String, S
}


@ParallelTest
@Test
public void testReconcileCasGeneratesCertsInitially(VertxTestContext context) {
CertificateAuthority certificateAuthority = new CertificateAuthorityBuilder()
.withValidityDays(100)
Expand Down Expand Up @@ -282,7 +280,7 @@ public void testReconcileCasGeneratesCertsInitially(VertxTestContext context) {
})));
}

@ParallelTest
@Test
public void testReconcileCasWhenCustomCertsAreMissingThrows(VertxTestContext context) {
CertificateAuthority certificateAuthority = new CertificateAuthorityBuilder()
.withValidityDays(100)
Expand All @@ -299,7 +297,7 @@ public void testReconcileCasWhenCustomCertsAreMissingThrows(VertxTestContext con
})));
}

@ParallelTest
@Test
public void testReconcileCasNoCertsGetGeneratedOutsideRenewalPeriod(VertxTestContext context)
throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException {
assertNoCertsGetGeneratedOutsideRenewalPeriod(context, true);
Expand Down Expand Up @@ -375,7 +373,7 @@ private void assertNoCertsGetGeneratedOutsideRenewalPeriod(VertxTestContext cont

}

@ParallelTest
@Test
public void testGenerateTruststoreFromOldSecrets(VertxTestContext context)
throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException {
CertificateAuthority certificateAuthority = new CertificateAuthorityBuilder()
Expand Down Expand Up @@ -451,7 +449,7 @@ public void testGenerateTruststoreFromOldSecrets(VertxTestContext context)
})));
}

@ParallelTest
@Test
public void testNewCertsGetGeneratedWhenInRenewalPeriodAuto(VertxTestContext context)
throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException {
CertificateAuthority certificateAuthority = new CertificateAuthorityBuilder()
Expand Down Expand Up @@ -536,7 +534,7 @@ public void testNewCertsGetGeneratedWhenInRenewalPeriodAuto(VertxTestContext con
})));
}

@ParallelTest
@Test
public void testNewCertsGetGeneratedWhenInRenewalPeriodAutoOutsideOfMaintenanceWindow(VertxTestContext context)
throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException {
CertificateAuthority certificateAuthority = new CertificateAuthorityBuilder()
Expand Down Expand Up @@ -637,7 +635,7 @@ public void testNewCertsGetGeneratedWhenInRenewalPeriodAutoOutsideOfMaintenanceW
})));
}

@ParallelTest
@Test
public void testNewCertsGetGeneratedWhenInRenewalPeriodAutoWithinMaintenanceWindow(VertxTestContext context)
throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException {
CertificateAuthority certificateAuthority = new CertificateAuthorityBuilder()
Expand Down Expand Up @@ -737,7 +735,7 @@ public void testNewCertsGetGeneratedWhenInRenewalPeriodAutoWithinMaintenanceWind
})));
}

@ParallelTest
@Test
public void testNewKeyGetGeneratedWhenInRenewalPeriodAuto(VertxTestContext context)
throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException {
CertificateAuthority certificateAuthority = new CertificateAuthorityBuilder()
Expand Down Expand Up @@ -840,7 +838,7 @@ public void testNewKeyGetGeneratedWhenInRenewalPeriodAuto(VertxTestContext conte
})));
}

@ParallelTest
@Test
public void testNewKeyGeneratedWhenInRenewalPeriodAutoOutsideOfTimeWindow(VertxTestContext context)
throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException {
CertificateAuthority certificateAuthority = new CertificateAuthorityBuilder()
Expand Down Expand Up @@ -940,7 +938,7 @@ public void testNewKeyGeneratedWhenInRenewalPeriodAutoOutsideOfTimeWindow(VertxT
})));
}

@ParallelTest
@Test
public void testNewKeyGeneratedWhenInRenewalPeriodAutoWithinTimeWindow(VertxTestContext context)
throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException {
CertificateAuthority certificateAuthority = new CertificateAuthorityBuilder()
Expand Down Expand Up @@ -1064,7 +1062,7 @@ private X509Certificate x509Certificate(String newClusterCaCert) throws Certific
.generateCertificate(new ByteArrayInputStream(Base64.getDecoder().decode(newClusterCaCert)));
}

@ParallelTest
@Test
public void testExpiredCertsGetRemovedAuto(VertxTestContext context)
throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException {
CertificateAuthority certificateAuthority = new CertificateAuthorityBuilder()
Expand Down Expand Up @@ -1160,7 +1158,7 @@ public void testExpiredCertsGetRemovedAuto(VertxTestContext context)
})));
}

@ParallelTest
@Test
public void testCustomCertsNotReconciled(VertxTestContext context)
throws IOException, CertificateException, KeyStoreException, NoSuchAlgorithmException {
CertificateAuthority certificateAuthority = new CertificateAuthorityBuilder()
Expand Down Expand Up @@ -1204,7 +1202,7 @@ public void testCustomCertsNotReconciled(VertxTestContext context)
})));
}

@ParallelTest
@Test
public void testRenewalOfDeploymentCertificatesWithNullSecret() throws IOException {
CertAndKey newCertAndKey = new CertAndKey("new-key".getBytes(), "new-cert".getBytes(), "new-truststore".getBytes(), "new-keystore".getBytes(), "new-password");
ClusterCa clusterCaMock = mock(ClusterCa.class);
Expand All @@ -1226,7 +1224,7 @@ public void testRenewalOfDeploymentCertificatesWithNullSecret() throws IOExcepti
assertThat(newSecret.getData(), hasEntry("deployment.password", newCertAndKey.storePasswordAsBase64String()));
}

@ParallelTest
@Test
public void testRenewalOfDeploymentCertificatesWithRenewingCa() throws IOException {
Secret initialSecret = new SecretBuilder()
.withNewMetadata()
Expand Down Expand Up @@ -1260,7 +1258,7 @@ public void testRenewalOfDeploymentCertificatesWithRenewingCa() throws IOExcepti
assertThat(newSecret.getData(), hasEntry("deployment.password", newCertAndKey.storePasswordAsBase64String()));
}

@ParallelTest
@Test
public void testRenewalOfDeploymentCertificatesDelayedRenewal() throws IOException {
Secret initialSecret = new SecretBuilder()
.withNewMetadata()
Expand Down Expand Up @@ -1294,7 +1292,7 @@ public void testRenewalOfDeploymentCertificatesDelayedRenewal() throws IOExcepti
assertThat(newSecret.getData(), hasEntry("deployment.password", newCertAndKey.storePasswordAsBase64String()));
}

@ParallelTest
@Test
public void testRenewalOfDeploymentCertificatesDelayedRenewalOutsideOfMaintenanceWindow() throws IOException {
Secret initialSecret = new SecretBuilder()
.withNewMetadata()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
import io.strimzi.operator.common.model.OrderedProperties;
import io.strimzi.operator.common.operator.resource.SecretOperator;
import io.strimzi.test.TestUtils;
import io.strimzi.test.annotations.IsolatedTest;
import io.strimzi.test.annotations.ParallelTest;
import io.strimzi.test.mockkube.MockKube;
import io.vertx.core.Future;
import io.vertx.core.Vertx;
Expand All @@ -52,6 +50,7 @@
import org.apache.logging.log4j.Logger;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;

import java.util.Collections;
Expand Down Expand Up @@ -445,7 +444,7 @@ public void waitForConnectorNotReady(String connectorName, String reason, String
ConnectorMockTest.<KafkaConnector>statusIsForCurrentGeneration().and(notReady(reason, message)));
}

@ParallelTest
@Test
public void testConnectNotReadyWithoutSpec() {
String connectName = "cluster";
KafkaConnect connect = new KafkaConnectBuilder()
Expand All @@ -459,7 +458,7 @@ public void testConnectNotReadyWithoutSpec() {
waitForConnectNotReady(connectName, "InvalidResourceException", "Spec cannot be null");
}

@ParallelTest
@Test
public void testConnectorNotReadyWithoutStrimziClusterLabel() {
String connectorName = "connector";

Expand All @@ -477,7 +476,7 @@ public void testConnectorNotReadyWithoutStrimziClusterLabel() {
"Resource lacks label '" + Labels.STRIMZI_CLUSTER_LABEL + "': No connect cluster in which to create this connector.");
}

@ParallelTest
@Test
public void testConnectorNotReadyWhenConnectDoesNotExist() {
String connectorName = "connector";

Expand All @@ -493,7 +492,7 @@ public void testConnectorNotReadyWhenConnectDoesNotExist() {
"KafkaConnect resource 'cluster' identified by label '" + Labels.STRIMZI_CLUSTER_LABEL + "' does not exist in namespace ns.");
}

@ParallelTest
@Test
public void testConnectorNotReadyWithoutSpec() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down Expand Up @@ -522,7 +521,7 @@ public void testConnectorNotReadyWithoutSpec() {
waitForConnectorNotReady(connectorName, "InvalidResourceException", "spec property is required");
}

@ParallelTest
@Test
public void testConnectorNotReadyWhenConnectNotConfiguredForConnectors() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down Expand Up @@ -553,7 +552,7 @@ public void testConnectorNotReadyWhenConnectNotConfiguredForConnectors() {
}

/** Create connect, create connector, delete connector, delete connect */
@ParallelTest
@Test
public void testConnectConnectorConnectorConnect() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down Expand Up @@ -617,7 +616,7 @@ public void testConnectConnectorConnectorConnect() {
}

/** Create connector, create connect, delete connector, delete connect */
@IsolatedTest
@Test
public void testConnectorConnectConnectorConnect() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down Expand Up @@ -678,7 +677,7 @@ public void testConnectorConnectConnectorConnect() {
}

/** Create connect, create connector, delete connect, delete connector */
@ParallelTest
@Test
public void testConnectConnectorConnectConnector() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down Expand Up @@ -742,7 +741,7 @@ public void testConnectConnectorConnectConnector() {
}

/** Create connector, create connect, delete connect, delete connector */
@ParallelTest
@Test
public void testConnectorConnectConnectConnector() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down Expand Up @@ -809,7 +808,7 @@ public void testConnectorConnectConnectConnector() {
* check the connector is deleted from the old cluster
* check the connector is added to the new cluster
* */
@ParallelTest
@Test
public void testChangeStrimziClusterLabel(VertxTestContext context) throws InterruptedException {
String oldConnectClusterName = "cluster1";
String newConnectClusterName = "cluster2";
Expand Down Expand Up @@ -901,7 +900,7 @@ public void testChangeStrimziClusterLabel(VertxTestContext context) throws Inter
}

/** Create connect, create connector, delete connector, delete connect */
@IsolatedTest
@Test
public void testConnectorNotReadyWhenExceptionFromConnectRestApi() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down Expand Up @@ -956,7 +955,7 @@ public void testConnectorNotReadyWhenExceptionFromConnectRestApi() {
}

/** Create connect, create connector, pause connector, resume connector */
@ParallelTest
@Test
public void testConnectorPauseResume() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down Expand Up @@ -1044,7 +1043,7 @@ public void testConnectorPauseResume() {
}

/** Create connect, create connector, restart connector */
@ParallelTest
@Test
public void testConnectorRestart() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down Expand Up @@ -1118,7 +1117,7 @@ public void testConnectorRestart() {


/** Create connect, create connector, add restart annotation, fail to restart connector, check for condition */
@ParallelTest
@Test
public void testConnectorRestartFail() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down Expand Up @@ -1196,7 +1195,7 @@ public void testConnectorRestartFail() {


/** Create connect, create connector, restart connector task */
@ParallelTest
@Test
public void testConnectorRestartTask() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down Expand Up @@ -1269,7 +1268,7 @@ public void testConnectorRestartTask() {
}

/** Create connect, create connector, restart connector task */
@ParallelTest
@Test
public void testConnectorRestartTaskFail() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down Expand Up @@ -1346,7 +1345,7 @@ public void testConnectorRestartTaskFail() {
}

/** Create connect, create connector, Scale to 0 */
@ParallelTest
@Test
public void testConnectScaleToZero() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down Expand Up @@ -1412,7 +1411,7 @@ public void testConnectScaleToZero() {
}

/** Create connect, create connector, break the REST API */
@ParallelTest
@Test
public void testConnectRestAPIIssues() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down Expand Up @@ -1479,7 +1478,7 @@ public void testConnectRestAPIIssues() {
waitForConnectorNotReady(connectorName, "ConnectTimeoutException", "connection timed out");
}

@ParallelTest
@Test
public void testConnectorUnknownField() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down Expand Up @@ -1520,7 +1519,7 @@ public void testConnectorUnknownField() {
waitForConnectorCondition(connectorName, "Warning", "UnknownFields");
}

@ParallelTest
@Test
public void testConnectorReconciliationPausedUnpaused() {
String connectName = "cluster";
String connectorName = "connector";
Expand Down
Loading