mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-27 19:47:49 +01:00
Test against #934 on MySQL
This commit is contained in:
parent
c9c696e71d
commit
fd2e45b204
@ -109,7 +109,7 @@ public class DBPatchH2RegressionTest extends DBPatchRegressionTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void h2PatchTaskWorksWithoutErrors() {
|
||||
public void h2PatchesAreApplied() {
|
||||
Patch[] patches = underTest.patches();
|
||||
for (Patch patch : patches) {
|
||||
underTest.executeTransaction(patch);
|
||||
|
@ -23,6 +23,7 @@ import com.djrapitops.plan.db.access.queries.containers.ContainerFetchQueries;
|
||||
import com.djrapitops.plan.db.access.transactions.Transaction;
|
||||
import com.djrapitops.plan.db.access.transactions.commands.RemoveEverythingTransaction;
|
||||
import com.djrapitops.plan.db.access.transactions.init.CreateTablesTransaction;
|
||||
import com.djrapitops.plan.db.patches.KillsOptimizationPatch;
|
||||
import com.djrapitops.plan.db.patches.Patch;
|
||||
import com.djrapitops.plan.system.PlanSystem;
|
||||
import com.djrapitops.plan.system.settings.config.PlanConfig;
|
||||
@ -37,6 +38,7 @@ import utilities.OptionalAssert;
|
||||
import utilities.RandomData;
|
||||
import utilities.TestConstants;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
|
||||
/**
|
||||
@ -138,7 +140,7 @@ public class DBPatchMySQLRegressionTest extends DBPatchRegressionTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mysqlPatchTaskWorksWithoutErrors() {
|
||||
public void mysqlPatchesAreApplied() {
|
||||
Patch[] patches = underTest.patches();
|
||||
for (Patch patch : patches) {
|
||||
underTest.executeTransaction(patch);
|
||||
@ -153,4 +155,14 @@ public class DBPatchMySQLRegressionTest extends DBPatchRegressionTest {
|
||||
// Make sure no foreign key checks fail on removal
|
||||
underTest.executeTransaction(new RemoveEverythingTransaction());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mysqlDoesNotApplyKillsOptimizationPatchAgain() {
|
||||
mysqlPatchesAreApplied();
|
||||
|
||||
KillsOptimizationPatch patch = new KillsOptimizationPatch();
|
||||
underTest.executeTransaction(patch);
|
||||
|
||||
assertTrue(patch.hasBeenApplied());
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ public class DBPatchSQLiteRegressionTest extends DBPatchRegressionTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void sqlitePatchTaskWorksWithoutErrors() {
|
||||
public void sqlitePatchesAreApplied() {
|
||||
Patch[] patches = underTest.patches();
|
||||
for (Patch patch : patches) {
|
||||
underTest.executeTransaction(patch);
|
||||
|
Loading…
Reference in New Issue
Block a user