|
@@ -89,12 +89,14 @@ func TestPluginScheduleLifetime(t *testing.T) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- hashedIdentity, err := plugin.HashedIdentity()
|
|
|
+ identity, err := plugin.Identity()
|
|
|
if err != nil {
|
|
|
- t.Errorf("get plugin hashed identity failed: %v", err)
|
|
|
+ t.Errorf("get plugin identity failed: %v", err)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ hashedIdentity := plugin_entities.HashedIdentity(identity.String())
|
|
|
+
|
|
|
nodes, err := cluster[0].FetchPluginAvailableNodesByHashedId(hashedIdentity)
|
|
|
if err != nil {
|
|
|
t.Errorf("fetch plugin available nodes failed: %v", err)
|
|
@@ -197,12 +199,14 @@ func TestPluginScheduleWhenMasterClusterShutdown(t *testing.T) {
|
|
|
}
|
|
|
|
|
|
// check if plugins[master_idx] is removed
|
|
|
- hashedIdentity, err := plugins[masterIdx].HashedIdentity()
|
|
|
+ identity, err := plugins[masterIdx].Identity()
|
|
|
if err != nil {
|
|
|
- t.Errorf("get plugin hashed identity failed: %v", err)
|
|
|
+ t.Errorf("get plugin identity failed: %v", err)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ hashedIdentity := plugin_entities.HashedIdentity(identity.String())
|
|
|
+
|
|
|
ticker := time.NewTicker(time.Second)
|
|
|
timeout := time.NewTimer(MASTER_GC_INTERVAL * 2)
|
|
|
done := false
|
|
@@ -224,12 +228,14 @@ func TestPluginScheduleWhenMasterClusterShutdown(t *testing.T) {
|
|
|
}
|
|
|
|
|
|
// check if plugins[1-master_idx] is still scheduled
|
|
|
- hashedIdentity, err = plugins[1-masterIdx].HashedIdentity()
|
|
|
+ identity, err = plugins[1-masterIdx].Identity()
|
|
|
if err != nil {
|
|
|
- t.Errorf("get plugin hashed identity failed: %v", err)
|
|
|
+ t.Errorf("get plugin identity failed: %v", err)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ hashedIdentity = plugin_entities.HashedIdentity(identity.String())
|
|
|
+
|
|
|
nodes, err := cluster[1-masterIdx].FetchPluginAvailableNodesByHashedId(hashedIdentity)
|
|
|
if err != nil {
|
|
|
t.Errorf("fetch plugin available nodes failed: %v", err)
|