fix: 修复测试文件格式问题
- 修正测试文件中的换行符和格式 - 确保所有测试文件的一致性
This commit is contained in:
@@ -138,15 +138,15 @@ func TestClusterSafety_MultipleCursorWorkers(t *testing.T) {
|
||||
}
|
||||
|
||||
clientConfig := persistence.PersistenceClientConfig{
|
||||
Publisher: publisher,
|
||||
Logger: log,
|
||||
EnvelopeConfig: envelopeConfig,
|
||||
DBConfig: dbConfig,
|
||||
PersistenceConfig: persistenceConfig,
|
||||
CursorWorkerConfig: cursorConfig,
|
||||
EnableCursorWorker: true,
|
||||
RetryWorkerConfig: retryConfig,
|
||||
EnableRetryWorker: true,
|
||||
Publisher: publisher,
|
||||
Logger: log,
|
||||
EnvelopeConfig: envelopeConfig,
|
||||
DBConfig: dbConfig,
|
||||
PersistenceConfig: persistenceConfig,
|
||||
CursorWorkerConfig: cursorConfig,
|
||||
EnableCursorWorker: true,
|
||||
RetryWorkerConfig: retryConfig,
|
||||
EnableRetryWorker: true,
|
||||
}
|
||||
|
||||
client, err := persistence.NewPersistenceClient(ctx, clientConfig)
|
||||
@@ -334,4 +334,3 @@ func TestClusterSafety_ConcurrentStatusUpdate(t *testing.T) {
|
||||
|
||||
t.Log("✅ CAS mechanism working correctly - Only one update succeeded")
|
||||
}
|
||||
|
||||
|
||||
@@ -105,15 +105,15 @@ func TestCursorInitialization(t *testing.T) {
|
||||
}
|
||||
|
||||
clientConfig := persistence.PersistenceClientConfig{
|
||||
Publisher: publisher,
|
||||
Logger: log,
|
||||
EnvelopeConfig: envelopeConfig,
|
||||
DBConfig: dbConfig,
|
||||
PersistenceConfig: persistenceConfig,
|
||||
CursorWorkerConfig: cursorConfig,
|
||||
EnableCursorWorker: true,
|
||||
RetryWorkerConfig: retryConfig,
|
||||
EnableRetryWorker: true,
|
||||
Publisher: publisher,
|
||||
Logger: log,
|
||||
EnvelopeConfig: envelopeConfig,
|
||||
DBConfig: dbConfig,
|
||||
PersistenceConfig: persistenceConfig,
|
||||
CursorWorkerConfig: cursorConfig,
|
||||
EnableCursorWorker: true,
|
||||
RetryWorkerConfig: retryConfig,
|
||||
EnableRetryWorker: true,
|
||||
}
|
||||
|
||||
client, err := persistence.NewPersistenceClient(ctx, clientConfig)
|
||||
@@ -204,15 +204,15 @@ func TestCursorInitialization(t *testing.T) {
|
||||
}
|
||||
|
||||
clientConfig := persistence.PersistenceClientConfig{
|
||||
Publisher: publisher,
|
||||
Logger: log,
|
||||
EnvelopeConfig: envelopeConfig,
|
||||
DBConfig: dbConfig,
|
||||
PersistenceConfig: persistenceConfig,
|
||||
CursorWorkerConfig: cursorConfig,
|
||||
EnableCursorWorker: true,
|
||||
RetryWorkerConfig: retryConfig,
|
||||
EnableRetryWorker: true,
|
||||
Publisher: publisher,
|
||||
Logger: log,
|
||||
EnvelopeConfig: envelopeConfig,
|
||||
DBConfig: dbConfig,
|
||||
PersistenceConfig: persistenceConfig,
|
||||
CursorWorkerConfig: cursorConfig,
|
||||
EnableCursorWorker: true,
|
||||
RetryWorkerConfig: retryConfig,
|
||||
EnableRetryWorker: true,
|
||||
}
|
||||
|
||||
t.Log("📌 Creating PersistenceClient...")
|
||||
@@ -286,4 +286,3 @@ func TestCursorInitialization(t *testing.T) {
|
||||
t.Log("✅ Cursor initialization verification PASSED")
|
||||
t.Log(strings.Repeat("=", 60))
|
||||
}
|
||||
|
||||
|
||||
@@ -97,14 +97,14 @@ func TestPG_Query_Integration(t *testing.T) {
|
||||
op, err := model.NewFullOperation(
|
||||
model.Source(testOp.opSource),
|
||||
testOp.opType,
|
||||
testOp.prefix, // doPrefix
|
||||
testOp.repo, // doRepository
|
||||
testOp.doid, // doid
|
||||
testOp.producer, // producerID
|
||||
testOp.actor, // opActor
|
||||
nil, // requestBody
|
||||
nil, // responseBody
|
||||
testOp.time, // timestamp
|
||||
testOp.prefix, // doPrefix
|
||||
testOp.repo, // doRepository
|
||||
testOp.doid, // doid
|
||||
testOp.producer, // producerID
|
||||
testOp.actor, // opActor
|
||||
nil, // requestBody
|
||||
nil, // responseBody
|
||||
testOp.time, // timestamp
|
||||
)
|
||||
require.NoError(t, err, "Failed to create operation %s", testOp.opID)
|
||||
|
||||
@@ -535,14 +535,14 @@ func TestPG_PersistenceClient_Query_Integration(t *testing.T) {
|
||||
op, err := model.NewFullOperation(
|
||||
model.OpSourceDOIP,
|
||||
string(model.OpTypeCreate),
|
||||
"10.10000", // doPrefix
|
||||
"client-repo", // doRepository
|
||||
"10.10000", // doPrefix
|
||||
"client-repo", // doRepository
|
||||
fmt.Sprintf("10.10000/client-repo/test-%d", i), // doid
|
||||
fmt.Sprintf("client-producer-%d", i), // producerID
|
||||
fmt.Sprintf("client-actor-%d", i), // opActor
|
||||
nil, // requestBody
|
||||
nil, // responseBody
|
||||
time.Now(), // timestamp
|
||||
fmt.Sprintf("client-producer-%d", i), // producerID
|
||||
fmt.Sprintf("client-actor-%d", i), // opActor
|
||||
nil, // requestBody
|
||||
nil, // responseBody
|
||||
time.Now(), // timestamp
|
||||
)
|
||||
require.NoError(t, err)
|
||||
op.OpID = fmt.Sprintf("pg-client-query-%03d", i)
|
||||
@@ -613,4 +613,3 @@ func TestPG_PersistenceClient_Query_Integration(t *testing.T) {
|
||||
func strPtr(s string) *string {
|
||||
return &s
|
||||
}
|
||||
|
||||
|
||||
@@ -287,4 +287,3 @@ func TestPersistenceClient_QueryOperations(t *testing.T) {
|
||||
assert.Equal(t, StatusNotTrustlogged, status)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user