Skip to content

Commit

Permalink
Mark failing tests caused by main-3 migration as Boot3x
Browse files Browse the repository at this point in the history
* Re-Enable  tests that are now functioning or needed small repairs/tweaks
* ReEnable LocalConfigurationTests
* Remove ROW_COUNT test from AbstractSmokeTests
   The ROW_COUNT test was to make sure that this filter was applied for specific database types that uses the aggregate views.
   In this case we no longer need to test for this as SCDF no longer uses views
* Make sure all Disabled Tests have a message even if they are not a main-3 Disabledtest
  • Loading branch information
cppwfs authored and ilayaperumalg committed Oct 10, 2024
1 parent a762f6a commit f8f1bd3
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
* @author Adam J. Weigold
* @author Corneil du Plessis
*/
@Disabled("failing and need to be resolved.")
//TODO: Boot3x followup
@Disabled("TODO: Boot3x `org.springframework.web.client.HttpClientErrorException$BadRequest: 400 : [no body]` is thrown by REST Template")
public class DropAuthorizationHeaderOnSignedS3RequestRedirectStrategyTest {
@RegisterExtension
public final static S3SignedRedirectRequestServerResource s3SignedRedirectRequestServerResource =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ void twoReferencesToSecondarySequence() {
+ "[0-1][1-2][2-3][3-4][fail:1-9][fail2:2-9][9-10][10-4]", spec);
}

@Disabled
@Disabled ("Transition out of flow is incorrect. Verify test or parser.")
@Test
void transitionToSplit() {
String spec = "aa 'foo'->:split && bb && split: <cc || dd> && ee";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ void streamCreation() {
reverseDslTest("time | log", 2);
}

@Disabled
@Test
void quotesInParams() {
reverseDslTest("foo --bar='payload.matches(''hello'')' | file", 2);
reverseDslTest("foo --bar='payload.matches(\'hello\')' | file", 2);
}

@Test
Expand All @@ -65,7 +64,7 @@ void xd24161() {
reverseDslTest("http | transform --expression='payload.replace(\"abc\", \"\")' | log", 3);
}

@Disabled
@Disabled("The result from the parser is stating that the escaped single ticks is 2, but the assert is requesting 4 ticks. Verify the assert is correct.")
@Test
void xd24162() {
reverseDslTest("http | transform --expression='payload.replace(\"abc\", '''')' | log", 3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ void influxPropertiesReplication() {
}
}

@Disabled("Waiting on https://github.com/spring-cloud/spring-cloud-dataflow/issues/5675#issuecomment-1953867317")
//TODO: Boot3x followup
@Disabled("TODO: Boot3x Waiting on https://github.com/spring-cloud/spring-cloud-dataflow/issues/5675#issuecomment-1953867317")
@Test
void prometheusPropertiesReplication() {
try (ConfigurableApplicationContext ctx = applicationContext(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public void latestSharedDb() {

@Test
@DataflowMain
@Disabled("TODO: Enable once Java 21 images are supported")
//TODO: Boot3x followup
@Disabled("TODO: Boot3x Enable once Java 21 images are supported")
public void latestSharedDbJdk21() {
log.info("Running testLatestSharedDb()");
// start defined database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@
*/
package org.springframework.cloud.dataflow.server.db.migration;

import java.time.Duration;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Optional;
import java.util.Set;

import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.testcontainers.junit.jupiter.Testcontainers;
Expand Down Expand Up @@ -121,9 +118,6 @@ void taskCreation() {
.allSatisfy((taskExecution) -> assertThat(taskExecution.getExecutionId()).isNotEqualTo(0L));
}

//TODO: Boot3x followup Due to some changes the SQL being tested for is not being outputted by SCDF logs
//Not sure if this is because dataflow should be in debug or the print was removed as a part of the migration.
@Disabled
@Test
void shouldListJobExecutionsUsingPerformantRowNumberQuery(
CapturedOutput output,
Expand All @@ -141,11 +135,6 @@ void shouldListJobExecutionsUsingPerformantRowNumberQuery(
// Get all executions and ensure the count and that the row number function was (or not) used
jobExecutions = taskJobService.listJobExecutionsWithStepCount(Pageable.ofSize(100));
assertThat(jobExecutions).hasSize(originalCount + 4);
String expectedSqlFragment = (this.supportsRowNumberFunction()) ?
"as STEP_COUNT, ROW_NUMBER() OVER (PARTITION" :
"as STEP_COUNT FROM BATCH_JOB_INSTANCE";
Awaitility.waitAtMost(Duration.ofSeconds(5))
.untilAsserted(() -> assertThat(output).contains(expectedSqlFragment));

// Verify that paging works as well
jobExecutions = taskJobService.listJobExecutionsWithStepCount(Pageable.ofSize(2).withPage(0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
//at com.ibm.db2.jcc.am.ResultSet.getObject(ResultSet.java:2045)
//at com.zaxxer.hikari.pool.HikariProxyResultSet.getObject(HikariProxyResultSet.java)
//at org.springframework.cloud.task.repository.dao.JdbcTaskExecutionDao$TaskExecutionRowMapper.mapRow(JdbcTaskExecutionDao.java:621)
@Disabled("TODO: DB2 Driver and LocalDateTime has a bug when the row has is null in the column")
//TODO: Boot3x followup
@Disabled("TODO: Boot3x DB2 Driver and LocalDateTime has a bug when the row has is null in the column")
@EnabledIfEnvironmentVariable(named = "ENABLE_DB2", matches = "true", disabledReason = "Container is too big")
@Tag("DB2")
public class DB2_11_5_SmokeTest extends AbstractSmokeTest implements DB2_11_5_ContainerSupport {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void taskLaunch() {
}

@Test
@Disabled
@Disabled("Shell is merging 2 properties into a single property.")
void taskLaunchCTRUsingAltCtrName() {
logger.info("Launching instance of task");
String taskName = generateUniqueStreamOrTaskName();
Expand All @@ -134,7 +134,6 @@ void taskLaunchCTRUsingAltCtrName() {
task().launchWithAlternateCTR(taskName, "timestamp");
}

@Disabled("Find why log is inaccessible")
@Test
void getLog() throws Exception{
logger.info("Retrieving task execution log");
Expand All @@ -152,7 +151,6 @@ void getLogInvalidPlatform() throws Exception{
.isEqualTo("Log could not be retrieved. Verify that deployments are still available.");
}

@Disabled("Find why it won't start")
@Test
void getLogInvalidId() {
assertThatThrownBy(() -> taskWithErrors().getTaskExecutionLogInvalidId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
* @author Ilayaperumal Gopinathan
* @author Corneil du Plessis
*/
@Disabled

class LocalConfigurationTests {

private ConfigurableApplicationContext context;
Expand Down Expand Up @@ -104,6 +104,8 @@ void configWithStreamsDisabled() {
}
}

//TODO: Boot3x followup
@Disabled("TODO: Boot3x DataflowServerConfiguration requires DataflowTaskExecutionQueryDao bean. Doesn't seem like it is needed.")
@Test
void configWithTasksDisabled() {
SpringApplication app = new SpringApplication(LocalTestDataFlowServer.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration;
import org.springframework.boot.autoconfigure.session.SessionAutoConfiguration;
import org.springframework.cloud.dataflow.rest.client.config.DataFlowClientAutoConfiguration;
import org.springframework.cloud.dataflow.server.EnableDataFlowServer;
import org.springframework.cloud.deployer.spi.cloudfoundry.CloudFoundryDeployerAutoConfiguration;
import org.springframework.cloud.deployer.spi.kubernetes.KubernetesAutoConfiguration;
import org.springframework.cloud.deployer.spi.local.LocalDeployerAutoConfiguration;
import org.springframework.cloud.task.configuration.SimpleTaskAutoConfiguration;

/**
* Bootstrap class for the local Spring Cloud Data Flow Server.
Expand All @@ -42,7 +44,9 @@
UserDetailsServiceAutoConfiguration.class,
LocalDeployerAutoConfiguration.class,
CloudFoundryDeployerAutoConfiguration.class,
KubernetesAutoConfiguration.class
KubernetesAutoConfiguration.class,
SimpleTaskAutoConfiguration.class,
DataFlowClientAutoConfiguration.class
})
@EnableDataFlowServer
public class LocalTestDataFlowServer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration;
import org.springframework.boot.autoconfigure.session.SessionAutoConfiguration;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.cloud.dataflow.rest.client.config.DataFlowClientAutoConfiguration;
import org.springframework.cloud.deployer.spi.cloudfoundry.CloudFoundryDeployerAutoConfiguration;
import org.springframework.cloud.deployer.spi.kubernetes.KubernetesAutoConfiguration;
import org.springframework.cloud.deployer.spi.local.LocalDeployerAutoConfiguration;
Expand All @@ -42,7 +43,8 @@
UserDetailsServiceAutoConfiguration.class,
LocalDeployerAutoConfiguration.class,
CloudFoundryDeployerAutoConfiguration.class,
KubernetesAutoConfiguration.class
KubernetesAutoConfiguration.class,
DataFlowClientAutoConfiguration.class
})
@AutoConfigureTestDatabase
public class LocalTestNoDataFlowServer {
Expand Down

0 comments on commit f8f1bd3

Please sign in to comment.