diff --git a/weed/storage/store_load_balancing_simple_test.go b/weed/storage/store_load_balancing_simple_test.go index 2036bd23c..22f88ff0f 100644 --- a/weed/storage/store_load_balancing_simple_test.go +++ b/weed/storage/store_load_balancing_simple_test.go @@ -3,6 +3,7 @@ package storage import ( "os" "path/filepath" + "strconv" "testing" "github.com/seaweedfs/seaweedfs/weed/storage/needle" @@ -22,7 +23,7 @@ func TestLoadBalancingDistribution(t *testing.T) { numDirs := 3 for i := 0; i < numDirs; i++ { - dir := filepath.Join(tempDir, "dir"+string(rune('0'+i))) + dir := filepath.Join(tempDir, "dir"+strconv.Itoa(i)) os.MkdirAll(dir, 0755) dirs = append(dirs, dir) maxCounts = append(maxCounts, 100) // high limit @@ -83,10 +84,3 @@ func TestLoadBalancingDistribution(t *testing.T) { } } } - -// TestLoadBalancingWithRemoteVolumes tests that remote volumes are ignored in load balancing -func TestLoadBalancingWithRemoteVolumes(t *testing.T) { - // This is a unit test of LocalVolumesLen() which we already test above - // The integration test is complex due to file creation, so we'll keep it simple - t.Skip("Already tested by TestLocalVolumesLen") -} diff --git a/weed/storage/store_load_balancing_test.go b/weed/storage/store_load_balancing_test.go index a197f0657..4d2c1b61c 100644 --- a/weed/storage/store_load_balancing_test.go +++ b/weed/storage/store_load_balancing_test.go @@ -3,6 +3,7 @@ package storage import ( "os" "path/filepath" + "strconv" "testing" "github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb" @@ -231,7 +232,7 @@ func createTestVolume(vid needle.VolumeId, isRemote bool) *Volume { if isRemote { vol.hasRemoteFile = true vol.volumeInfo.Files = []*volume_server_pb.RemoteFile{ - {BackendType: "s3", BackendId: "test", Key: "remote-key-" + string(rune(vid))}, + {BackendType: "s3", BackendId: "test", Key: "remote-key-" + strconv.Itoa(int(vid))}, } }