stc work queue test improvements
Change-Id: I8b9335b0bbfdc8a447c5955bf3621962ff112cb2
diff --git a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/WorkQueueTestCommand.java b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/WorkQueueTestCommand.java
index 62aefc5..bedc758 100644
--- a/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/WorkQueueTestCommand.java
+++ b/apps/test/distributed-primitives/src/main/java/org/onosproject/distributedprimitives/cli/WorkQueueTestCommand.java
@@ -46,7 +46,7 @@
@Argument(index = 1, name = "operation",
description = "operation name. One of {add, addMutiple, "
- + "takeAndComplete, totalPending, totalInProgress, totalCompleted}",
+ + "takeAndComplete, totalPending, totalInProgress, totalCompleted, destroy}",
required = true, multiValued = false)
String operation = null;
@@ -95,9 +95,11 @@
} else if (operation.equals("totalCompleted")) {
WorkQueueStats stats = get(queue.stats());
print("%d", stats.totalCompleted());
+ } else if (operation.equals("destroy")) {
+ get(queue.destroy());
} else {
print("Invalid operation name. Valid operations names are:"
- + " [add, addMultiple takeAndComplete, totalPending, totalInProgress, totalCompleted]");
+ + " [add, addMultiple takeAndComplete, totalPending, totalInProgress, totalCompleted, destroy]");
}
}