Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzelin committed Jan 2, 2025
1 parent 73d1d33 commit 662da7a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ branchName, branchPath(tablePath, branchName)),

public void createBranch(String branchName, String tagName) {
validateBranch(branchName);
Snapshot snapshot = tagManager.getOrThrow(tagName);
Snapshot snapshot = tagManager.getOrThrow(tagName).trimToSnapshot();

try {
// Copy the corresponding tag, snapshot and schema files into the branch directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1138,9 +1138,9 @@ public void testCreateSameTagName() throws Exception {
assertThat(tagManager.tagExists("test-tag")).isTrue();
// Create again failed if tag existed
Assertions.assertThatThrownBy(() -> table.createTag("test-tag", 1))
.hasMessageContaining("Tag name 'test-tag' already exists.");
.hasMessageContaining("Tag 'test-tag' already exists.");
Assertions.assertThatThrownBy(() -> table.createTag("test-tag", 2))
.hasMessageContaining("Tag name 'test-tag' already exists.");
.hasMessageContaining("Tag 'test-tag' already exists.");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void testReplaceTag() throws Exception {
() ->
bEnv.executeSql(
"CALL sys.replace_tag(`table` => 'default.T', tag => 'test_tag')"))
.hasMessageContaining("Tag name 'test_tag' does not exist.");
.hasMessageContaining("Tag 'test_tag' doesn't exist.");

bEnv.executeSql("CALL sys.create_tag(`table` => 'default.T', tag => 'test_tag')");
assertThat(tagManager.tagExists("test_tag")).isEqualTo(true);
Expand Down

0 comments on commit 662da7a

Please sign in to comment.