Initial implementation of CORRUPT state (ONOS-1060)
- Added CORRUPT state to state machine and event type
- Simplified phases using new request field
- Improved null-safety by using Optionals
Change-Id: I1d576b719765b5664aef73477ee04593e8acc4fd
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/phase/CompilingTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/phase/CompilingTest.java
index f3e91a4..742b4e2 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/phase/CompilingTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/phase/CompilingTest.java
@@ -121,7 +121,7 @@
expect(processor.compile(input, null)).andReturn(Arrays.asList(compiled));
replay(processor);
- Compiling sut = new Compiling(processor, pending);
+ Compiling sut = new Compiling(processor, pending, Optional.empty());
Optional<IntentProcessPhase> output = sut.execute();
@@ -139,11 +139,11 @@
expect(processor.compile(input, null)).andThrow(new IntentCompilationException());
replay(processor);
- Compiling sut = new Compiling(processor, pending);
+ Compiling sut = new Compiling(processor, pending, Optional.empty());
Optional<IntentProcessPhase> output = sut.execute();
verify(processor);
- assertThat(output.get(), is(instanceOf(CompileFailed.class)));
+ assertThat(output.get(), is(instanceOf(Failed.class)));
}
}