bipinprasad commented on a change in pull request #3322:
URL: https://github.com/apache/storm/pull/3322#discussion_r470060170
##########
File path: storm-client/test/jvm/org/apache/storm/utils/UtilsTest.java
##########
@@ -237,4 +254,184 @@ public void checkVersionInfo() {
assertNotNull(found);
assertEquals(key, found.getVersion());
}
+
+ @Test
+ public void testFindComponentCycles() {
+ class CycleDetectionScenario {
+ final String testName;
+ final String testDescription;
+ final StormTopology topology;
+ final int expectedCycles;
+
+ CycleDetectionScenario() {
+ testName = "dummy";
+ testDescription = "dummy test";
+ topology = null;
+ expectedCycles = 0;
+ }
+
+ CycleDetectionScenario(String testName, String testDescription,
StormTopology topology, int expectedCycles) {
+ this.testName = testName;
+ this.testDescription = testDescription;
+ this.topology = topology;
+ this.expectedCycles = expectedCycles;
+ }
+
+ private IRichSpout makeDummySpout() {
+ return new BaseRichSpout() {
+ @Override
+ public void declareOutputFields(OutputFieldsDeclarer
declarer) {
+ }
+
+ @Override
+ public void open(Map<String, Object> conf, TopologyContext
context, SpoutOutputCollector collector) {
+ }
+
+ @Override
+ public void nextTuple() {
+ }
+
+ private void writeObject(java.io.ObjectOutputStream
stream) {
+ }
+ };
+ }
+
+ private IStatefulBolt makeDummyStatefulBolt() {
Review comment:
Replaced with TestWordSpout and TestWordCounter
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]