VOL-4559: Delete the TP Instance and TP ID first once all the GEM
references are cleared before checking for other TP instances with
the same alloc-id in case of instance-control is single-instance per ONU.
Also has more fixes related to handling of instance-control onu single-
instance during setup and removal of schedulers/queues.

Also fix issue related to stale data after device delete for mcast
queues.

Change-Id: Iaca358128e91c3f1ba23dd4bea3d05dccc67bb02
diff --git a/internal/pkg/resourcemanager/resourcemanager_test.go b/internal/pkg/resourcemanager/resourcemanager_test.go
index c4a6751..5392eb7 100644
--- a/internal/pkg/resourcemanager/resourcemanager_test.go
+++ b/internal/pkg/resourcemanager/resourcemanager_test.go
@@ -864,6 +864,23 @@
 	}
 }
 
+func TestOpenOltResourceMgr_DeleteMcastQueueForIntf(t *testing.T) {
+	tests := []struct {
+		name   string
+		fields *fields
+	}{
+		{"DeleteMcastQueueForIntf-1", getResMgr()},
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			RsrcMgr := testResMgrObject(tt.fields)
+			ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
+			defer cancel()
+			RsrcMgr.DeleteMcastQueueForIntf(ctx)
+		})
+	}
+}
+
 func newGroup(groupID uint32, outPorts []uint32) *ofp.OfpGroupEntry {
 	groupDesc := ofp.OfpGroupDesc{
 		Type:    ofp.OfpGroupType_OFPGT_ALL,