Skip to content

Commit 9326b6d

Browse files
committed
update
1 parent 74c09c3 commit 9326b6d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

downstreamadapter/sink/cloudstorage/sink_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ func TestWriteDDLEventWithInvalidExchangePartitionEvent(t *testing.T) {
289289
ctx, cancel := context.WithCancel(context.Background())
290290
defer cancel()
291291

292+
mockPDClock := pdutil.NewClock4Test()
293+
appcontext.SetService(appcontext.DefaultPDClock, mockPDClock)
294+
292295
cloudStorageSink, err := newSinkForTest(ctx, replicaConfig, sinkURI, nil)
293296
require.NoError(t, err)
294297

pkg/sink/cloudstorage/table_definition.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ package cloudstorage
1414

1515
import (
1616
"encoding/json"
17-
"fmt"
1817
"sort"
1918
"strconv"
2019
"strings"
@@ -340,9 +339,6 @@ func (t *TableDefinition) GenerateSchemaFilePath(useTableIDAsPath bool, tableID
340339
if !t.IsTableSchema() && t.Table != "" {
341340
log.Panic("invalid table definition", zap.Any("tableDef", t))
342341
}
343-
table := t.Table
344-
if useTableIDAsPath && t.IsTableSchema() {
345-
table = fmt.Sprintf("%d", tableID)
346-
}
342+
table := generateTablePath(t.Table, tableID, useTableIDAsPath)
347343
return generateSchemaFilePath(t.Schema, table, t.TableVersion, checksum), nil
348344
}

0 commit comments

Comments
 (0)