[VOL-2673]:added check to verify deletion of onu devices on deleting same.

Change-Id: If01e3ccca6bfd605cee5f5a46a3cddc2b4e6a483
diff --git a/rw_core/core/grpc_nbi_api_handler_test.go b/rw_core/core/grpc_nbi_api_handler_test.go
index b0f0029..1abc565 100755
--- a/rw_core/core/grpc_nbi_api_handler_test.go
+++ b/rw_core/core/grpc_nbi_api_handler_test.go
@@ -551,11 +551,19 @@
 		err = waitUntilDeviceReadiness(onu.Id, nb.maxTimeout, vdFunction, nbi)
 		assert.Nil(t, err)
 	}
+	// Wait for each onu device to get deleted
+	var vdFunc isDeviceConditionSatisfied = func(device *voltha.Device) bool {
+		return device == nil
+	}
+
 	// Delete the onuDevice
 	for _, onu := range onuDevices.Items {
 		_, err = nbi.DeleteDevice(getContext(), &voltha.ID{Id: onu.Id})
 		assert.Nil(t, err)
+		err = waitUntilDeviceReadiness(onu.Id, nb.maxTimeout, vdFunc, nbi)
+		assert.Nil(t, err)
 	}
+
 	// Disable the oltDevice
 	_, err = nbi.DisableDevice(getContext(), &voltha.ID{Id: oltDevice.Id})
 	assert.Nil(t, err)