Committed by
Yuta HIGUCHI
Fix "Driver service not bound yet" issue in optical compiler.
Change-Id: I16e03a108f0ebaa077b33de73cb9641d913b96e5
Showing
1 changed file
with
8 additions
and
0 deletions
| ... | @@ -18,6 +18,7 @@ package org.onosproject.net.intent.impl.compiler; | ... | @@ -18,6 +18,7 @@ package org.onosproject.net.intent.impl.compiler; |
| 18 | import org.easymock.EasyMock; | 18 | import org.easymock.EasyMock; |
| 19 | import org.junit.After; | 19 | import org.junit.After; |
| 20 | import org.junit.Before; | 20 | import org.junit.Before; |
| 21 | +import org.junit.BeforeClass; | ||
| 21 | import org.junit.Test; | 22 | import org.junit.Test; |
| 22 | import org.onlab.packet.ChassisId; | 23 | import org.onlab.packet.ChassisId; |
| 23 | import org.onosproject.TestApplicationId; | 24 | import org.onosproject.TestApplicationId; |
| ... | @@ -25,6 +26,7 @@ import org.onosproject.cfg.ComponentConfigService; | ... | @@ -25,6 +26,7 @@ import org.onosproject.cfg.ComponentConfigService; |
| 25 | import org.onosproject.core.ApplicationId; | 26 | import org.onosproject.core.ApplicationId; |
| 26 | import org.onosproject.core.CoreService; | 27 | import org.onosproject.core.CoreService; |
| 27 | import org.onosproject.core.IdGenerator; | 28 | import org.onosproject.core.IdGenerator; |
| 29 | +import org.onosproject.net.AbstractProjectableModel; | ||
| 28 | import org.onosproject.net.Annotations; | 30 | import org.onosproject.net.Annotations; |
| 29 | import org.onosproject.net.ChannelSpacing; | 31 | import org.onosproject.net.ChannelSpacing; |
| 30 | import org.onosproject.net.DefaultAnnotations; | 32 | import org.onosproject.net.DefaultAnnotations; |
| ... | @@ -69,6 +71,7 @@ import org.onosproject.net.driver.DefaultDriver; | ... | @@ -69,6 +71,7 @@ import org.onosproject.net.driver.DefaultDriver; |
| 69 | import org.onosproject.net.driver.Driver; | 71 | import org.onosproject.net.driver.Driver; |
| 70 | import org.onosproject.net.driver.DriverHandler; | 72 | import org.onosproject.net.driver.DriverHandler; |
| 71 | import org.onosproject.net.driver.DriverService; | 73 | import org.onosproject.net.driver.DriverService; |
| 74 | +import org.onosproject.net.driver.DriverServiceAdapter; | ||
| 72 | import org.onosproject.net.driver.TestBehaviourImpl; | 75 | import org.onosproject.net.driver.TestBehaviourImpl; |
| 73 | import org.onosproject.net.driver.TestBehaviourTwoImpl; | 76 | import org.onosproject.net.driver.TestBehaviourTwoImpl; |
| 74 | 77 | ||
| ... | @@ -354,6 +357,11 @@ public class OpticalCircuitIntentCompilerTest { | ... | @@ -354,6 +357,11 @@ public class OpticalCircuitIntentCompilerTest { |
| 354 | } | 357 | } |
| 355 | } | 358 | } |
| 356 | 359 | ||
| 360 | + @BeforeClass | ||
| 361 | + public static void setUpClass() { | ||
| 362 | + AbstractProjectableModel.setDriverService("key", new DriverServiceAdapter()); | ||
| 363 | + } | ||
| 364 | + | ||
| 357 | @Before | 365 | @Before |
| 358 | public void setUp() { | 366 | public void setUp() { |
| 359 | sut = new OpticalCircuitIntentCompiler(); | 367 | sut = new OpticalCircuitIntentCompiler(); | ... | ... |
-
Please register or login to post a comment