Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0775fc7

Browse filesBrowse files
committed
Add backups enabled DbGitIntegrationTestBasic#gitToDbRestoreWorks
This scenario uses sequential restore and can cause some errors in backup adapters when running
1 parent 6d4bbcd commit 0775fc7
Copy full SHA for 0775fc7

3 files changed

+48Lines changed: 48 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/test/java/ru/fusionsoft/dbgit/integration/DbGitIntegrationTestBasic.java‎

Copy file name to clipboardExpand all lines: src/test/java/ru/fusionsoft/dbgit/integration/DbGitIntegrationTestBasic.java
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import ru.fusionsoft.dbgit.integration.primitives.args.specific.ArgsDbGitAddRemoteTestRepo;
2020
import ru.fusionsoft.dbgit.integration.primitives.chars.CommitsFromRepo;
2121
import ru.fusionsoft.dbgit.integration.primitives.chars.LinesOfUnsafeScalar;
22+
import ru.fusionsoft.dbgit.integration.primitives.chars.specific.dbgit.CharsDbGitConfigBackupEnabled;
2223
import ru.fusionsoft.dbgit.integration.primitives.patch.specific.PathPatchDbGitCheckout;
2324
import ru.fusionsoft.dbgit.integration.primitives.patch.specific.PathPatchDbGitCheckoutHard;
2425
import ru.fusionsoft.dbgit.integration.primitives.patch.specific.PathPatchDbGitClonesRepo;
@@ -252,12 +253,15 @@ public final void gitToDbRestoreWorks() throws Exception {
252253
new PathPatchDbGitCheckout(nameOfSourceBranch, "-b", "-nodb"),
253254
new PathPatchDbGitCheckout(commitNames.get(0), "-nodb", "-v"),
254255
new PathPatchDbGitLink(linkArgs),
256+
new PathPatchCreatingFile(".dbgit/dbgitconfig", new CharsDbGitConfigBackupEnabled()),
255257
new PathPatchDbGitRestore("-r", "-v"),
256258
new PathPatchDbGitCheckoutHard(commitNames.get(1), "-nodb", "-v"),
257259
new PathPatchDbGitLink(linkArgs),
260+
new PathPatchCreatingFile(".dbgit/dbgitconfig", new CharsDbGitConfigBackupEnabled()),
258261
new PathPatchDbGitRestore("-r", "-v"),
259262
new PathPatchDbGitCheckoutHard(commitNames.get(2), "-nodb", "-v"),
260263
new PathPatchDbGitLink(linkArgs),
264+
new PathPatchCreatingFile(".dbgit/dbgitconfig", new CharsDbGitConfigBackupEnabled()),
261265
new PathPatchDbGitRestore("-r", "-v")
262266
),
263267
new ProjectTestResourcesCleanDirectoryPath("04")
Collapse file
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package ru.fusionsoft.dbgit.integration.primitives.chars.specific.dbgit;
2+
3+
import ru.fusionsoft.dbgit.integration.primitives.chars.CharSequenceEnvelope;
4+
5+
public class CharsDbGitConfigBackupEnabled extends CharSequenceEnvelope {
6+
public CharsDbGitConfigBackupEnabled() {
7+
super(() -> {
8+
return "[core]\n"
9+
+ "MAX_ROW_COUNT_FETCH = 10000\n"
10+
+ "LIMIT_FETCH = true\n"
11+
+ "LOG_ROTATE = 31\n"
12+
+ "LANG = ENG\n"
13+
+ "SCRIPT_ROTATE = 31\n"
14+
+ "TO_MAKE_BACKUP = true\n"
15+
+ "BACKUP_TO_SCHEME = true\n"
16+
+ "BACKUP_TABLEDATA = true\n"
17+
+ "PORTION_SIZE = 50000\n"
18+
+ "TRY_COUNT = 1000\n"
19+
+ "TRY_DELAY = 10\n";
20+
});
21+
}
22+
}
Collapse file
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package ru.fusionsoft.dbgit.integration.primitives.chars.specific.dbgit;
2+
3+
import ru.fusionsoft.dbgit.integration.primitives.chars.CharSequenceEnvelope;
4+
5+
public class CharsDbGitConfigDefault extends CharSequenceEnvelope {
6+
public CharsDbGitConfigDefault() {
7+
super(()->{
8+
return "[core]\n"
9+
+ "MAX_ROW_COUNT_FETCH = 10000\n"
10+
+ "LIMIT_FETCH = true\n"
11+
+ "LOG_ROTATE = 31\n"
12+
+ "LANG = ENG\n"
13+
+ "SCRIPT_ROTATE = 31\n"
14+
+ "TO_MAKE_BACKUP = false\n"
15+
+ "BACKUP_TO_SCHEME = true\n"
16+
+ "BACKUP_TABLEDATA = true\n"
17+
+ "PORTION_SIZE = 50000\n"
18+
+ "TRY_COUNT = 1000\n"
19+
+ "TRY_DELAY = 10\n";
20+
});
21+
}
22+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.