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

Fix(Core): Renamed Task241009CreatePostgresJobQueueTables because of dates inconsistencies with previous tasks preventing the task to run #31000

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* implementation. This task creates the job_queue, job, and job_history tables along with their
* associated indexes.
*/
public class Task241009CreatePostgresJobQueueTables implements StartupTask {
public class Task250113CreatePostgresJobQueueTables implements StartupTask {

@Override
public boolean forceRun() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
import com.dotmarketing.startup.runonce.Task240513UpdateContentTypesSystemField;
import com.dotmarketing.startup.runonce.Task240530AddDotAIPortletToLayout;
import com.dotmarketing.startup.runonce.Task240606AddVariableColumnToWorkflow;
import com.dotmarketing.startup.runonce.Task241009CreatePostgresJobQueueTables;
import com.dotmarketing.startup.runonce.Task250113CreatePostgresJobQueueTables;
import com.dotmarketing.startup.runonce.Task241013RemoveFullPathLcColumnFromIdentifier;
import com.dotmarketing.startup.runonce.Task241014AddTemplateValueOnContentletIndex;
import com.dotmarketing.startup.runonce.Task241015ReplaceLanguagesWithLocalesPortlet;
Expand Down Expand Up @@ -573,12 +573,12 @@ public static List<Class<?>> getStartupRunOnceTaskClasses() {
.add(Task240513UpdateContentTypesSystemField.class)
.add(Task240530AddDotAIPortletToLayout.class)
.add(Task240606AddVariableColumnToWorkflow.class)
.add(Task241009CreatePostgresJobQueueTables.class)
.add(Task241013RemoveFullPathLcColumnFromIdentifier.class)
.add(Task241014AddTemplateValueOnContentletIndex.class)
.add(Task241015ReplaceLanguagesWithLocalesPortlet.class)
.add(Task241016AddCustomLanguageVariablesPortletToLayout.class)
.add(Task250107RemoveEsReadOnlyMonitorJob.class)
.add(Task250113CreatePostgresJobQueueTables.class)
.build();
return ret.stream().sorted(classNameComparator).collect(Collectors.toList());
}
Expand Down
5 changes: 2 additions & 3 deletions dotcms-integration/src/test/java/com/dotcms/MainSuite2b.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
import com.dotmarketing.startup.runonce.Task240513UpdateContentTypesSystemFieldTest;
import com.dotmarketing.startup.runonce.Task240530AddDotAIPortletToLayoutTest;
import com.dotmarketing.startup.runonce.Task240606AddVariableColumnToWorkflowTest;
import com.dotmarketing.startup.runonce.Task241009CreatePostgresJobQueueTablesTest;
import com.dotmarketing.startup.runonce.Task250113CreatePostgresJobQueueTablesTest;
import com.dotmarketing.startup.runonce.Task241013RemoveFullPathLcColumnFromIdentifierTest;
import com.dotmarketing.startup.runonce.Task241015ReplaceLanguagesWithLocalesPortletTest;
import com.dotmarketing.startup.runonce.Task241016AddCustomLanguageVariablesPortletToLayoutTest;
Expand Down Expand Up @@ -397,8 +397,7 @@
SimpleJUnit4InjectionIT.class,
LegacyJSONObjectRenderTest.class,
Task241013RemoveFullPathLcColumnFromIdentifierTest.class,
Task241009CreatePostgresJobQueueTablesTest.class,

Task250113CreatePostgresJobQueueTablesTest.class,
UniqueFieldDataBaseUtilTest.class,
DBUniqueFieldValidationStrategyTest.class,
Task241013RemoveFullPathLcColumnFromIdentifierTest.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
import org.junit.Test;

/**
* Test class for {@link Task241009CreatePostgresJobQueueTables}.
* Test class for {@link Task250113CreatePostgresJobQueueTables}.
* <p>
* This test class ensures that the job queue tables are properly created by the upgrade task.
* <p>
* The test first drops the tables if they exist, then executes the upgrade task and validates that
* the tables were successfully created.
*/
public class Task241009CreatePostgresJobQueueTablesTest extends IntegrationTestBase {
public class Task250113CreatePostgresJobQueueTablesTest extends IntegrationTestBase {

/**
* Initializes the test environment and ensures the job queue tables do not exist.
Expand Down Expand Up @@ -66,8 +66,8 @@ private void dropTablesIfExist() {
}

/**
* Method to test {@link Task241009CreatePostgresJobQueueTables#executeUpgrade()} and
* {@link Task241009CreatePostgresJobQueueTables#forceRun()}.
* Method to test {@link Task250113CreatePostgresJobQueueTables#executeUpgrade()} and
* {@link Task250113CreatePostgresJobQueueTables#forceRun()}.
* <p>
* Given Scenario: The job queue tables do not exist.
* <p>
Expand Down Expand Up @@ -98,8 +98,8 @@ public void executeTaskUpgrade() throws SQLException, DotDataException, DotSecur
}

/**
* Method to test {@link Task241009CreatePostgresJobQueueTables#executeUpgrade()} and
* {@link Task241009CreatePostgresJobQueueTables#forceRun()}.
* Method to test {@link Task250113CreatePostgresJobQueueTables#executeUpgrade()} and
* {@link Task250113CreatePostgresJobQueueTables#forceRun()}.
* <p>
* Given Scenario: The job queue tables do not exist, and the upgrade task is run twice.
* <p>
Expand Down Expand Up @@ -130,7 +130,7 @@ public void executeTaskUpgradeTwice()
// Run the upgrade task again, should not fail
LocalTransaction.wrap(() -> {
try {
final var task = new Task241009CreatePostgresJobQueueTables();
final var task = new Task250113CreatePostgresJobQueueTables();
task.executeUpgrade();
} catch (Exception e) {
final var message = "The upgrade task should not fail when the tables already exist";
Expand All @@ -149,7 +149,7 @@ public void executeTaskUpgradeTwice()
private static void executeUpgradeAndValidate()
throws SQLException, DotDataException, DotSecurityException {

final var task = new Task241009CreatePostgresJobQueueTables();
final var task = new Task250113CreatePostgresJobQueueTables();
final Connection connection = DbConnectionFactory.getConnection();
final DotDatabaseMetaData databaseMetaData = new DotDatabaseMetaData();

Expand Down
Loading