You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
731 B
21 lines
731 B
package command
|
|
|
|
import (
|
|
"testing"
|
|
|
|
pluginworker "github.com/seaweedfs/seaweedfs/weed/plugin/worker"
|
|
"google.golang.org/grpc"
|
|
"google.golang.org/grpc/credentials/insecure"
|
|
)
|
|
|
|
func TestWorkerDefaultJobTypes(t *testing.T) {
|
|
dialOption := grpc.WithTransportCredentials(insecure.NewCredentials())
|
|
handlers, err := buildPluginWorkerHandlers(*workerJobType, dialOption, int(pluginworker.DefaultMaxExecutionConcurrency), "")
|
|
if err != nil {
|
|
t.Fatalf("buildPluginWorkerHandlers(default worker flag) err = %v", err)
|
|
}
|
|
// Expected: vacuum, volume_balance, admin_script, erasure_coding, iceberg_maintenance
|
|
if len(handlers) != 5 {
|
|
t.Fatalf("expected default worker job types to include 5 handlers, got %d", len(handlers))
|
|
}
|
|
}
|