mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-27 23:40:41 +01:00
fmt
This commit is contained in:
1 parent
aecc020b14
commit
baed1e156a
4 files changed
+142
-142
No files matched your search
@@ -22,7 +22,7 @@ func TestMetadataResponseComparison(t *testing.T) {
|
||||
|
||||
host, port := gatewayServer.GetListenerAddr()
|
||||
addr := fmt.Sprintf("%s:%d", host, port)
|
||||
|
||||
|
||||
// Add the same topic for both tests
|
||||
topic := "comparison-topic"
|
||||
gatewayServer.GetHandler().AddTopicForTesting(topic, 1)
|
||||
@@ -30,17 +30,17 @@ func TestMetadataResponseComparison(t *testing.T) {
|
||||
t.Logf("=== COMPARISON TEST ===")
|
||||
t.Logf("Gateway: %s", addr)
|
||||
t.Logf("Topic: %s", topic)
|
||||
|
||||
|
||||
// The key insight: Both Sarama and kafka-go should get the SAME metadata response
|
||||
// But Sarama works and kafka-go doesn't - this suggests kafka-go has stricter validation
|
||||
|
||||
|
||||
// Let's examine what our current Metadata v4 response looks like
|
||||
t.Logf("Run Sarama test and kafka-go test separately to compare logs")
|
||||
t.Logf("Look for differences in:")
|
||||
t.Logf("1. Response byte counts")
|
||||
t.Logf("2. Broker ID consistency")
|
||||
t.Logf("2. Broker ID consistency")
|
||||
t.Logf("3. Partition leader/ISR values")
|
||||
t.Logf("4. Error codes")
|
||||
|
||||
|
||||
// This test is just for documentation - the real comparison happens in logs
|
||||
}
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/segmentio/kafka-go"
|
||||
"github.com/seaweedfs/seaweedfs/weed/mq/kafka/gateway"
|
||||
"github.com/segmentio/kafka-go"
|
||||
)
|
||||
|
||||
func TestMetadataV6Debug(t *testing.T) {
|
||||
@@ -41,7 +41,7 @@ func TestMetadataV6Debug(t *testing.T) {
|
||||
|
||||
t.Logf("Successfully read %d partitions for topic %s", len(partitions), topic)
|
||||
for _, p := range partitions {
|
||||
t.Logf("Partition %d: Leader=%d, Replicas=%v, ISR=%v",
|
||||
t.Logf("Partition %d: Leader=%d, Replicas=%v, ISR=%v",
|
||||
p.ID, p.Leader.ID, p.Replicas, p.Isr)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user