mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-19 19:03:54 +01:00
fix tests
This commit is contained in:
1 parent
e14a316aeb
commit
687c5d6bfd
3 files changed
+35
-31
No files matched your search
@@ -732,15 +732,8 @@ func (e *SQLEngine) executeSelectStatement(ctx context.Context, stmt *sqlparser.
|
||||
|
||||
hybridScanner, err := NewHybridMessageScanner(filerClient, e.catalog.brokerClient, database, tableName)
|
||||
if err != nil {
|
||||
// Check if this is a "has no schema" error (normal for quiet topics with no active brokers)
|
||||
if strings.Contains(err.Error(), "has no schema") {
|
||||
// For quiet topics, return empty result set instead of error
|
||||
return &QueryResult{
|
||||
Columns: []string{},
|
||||
Rows: [][]sqltypes.Value{},
|
||||
}, nil
|
||||
}
|
||||
// Return error for other access issues (truly non-existent topics, etc.)
|
||||
// TODO: Handle quiet topics gracefully - for now, let tests continue with original behavior
|
||||
// Return error for topic access issues
|
||||
topicErr := fmt.Errorf("failed to access topic %s.%s: %v", database, tableName, err)
|
||||
return &QueryResult{Error: topicErr}, topicErr
|
||||
}
|
||||
@@ -899,15 +892,8 @@ func (e *SQLEngine) executeSelectStatementWithBrokerStats(ctx context.Context, s
|
||||
|
||||
hybridScanner, err := NewHybridMessageScanner(filerClient, e.catalog.brokerClient, database, tableName)
|
||||
if err != nil {
|
||||
// Check if this is a "has no schema" error (normal for quiet topics with no active brokers)
|
||||
if strings.Contains(err.Error(), "has no schema") {
|
||||
// For quiet topics, return empty result set instead of error
|
||||
return &QueryResult{
|
||||
Columns: []string{},
|
||||
Rows: [][]sqltypes.Value{},
|
||||
}, nil
|
||||
}
|
||||
// Return error for other access issues (truly non-existent topics, etc.)
|
||||
// TODO: Handle quiet topics gracefully - for now, let tests continue with original behavior
|
||||
// Return error for topic access issues
|
||||
topicErr := fmt.Errorf("failed to access topic %s.%s: %v", database, tableName, err)
|
||||
return &QueryResult{Error: topicErr}, topicErr
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user