Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
tom
2014-09-22 17:14:18 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
85ff08b1e517423b53fd63f16613d89e8d747836
85ff08b1
1 parent
bce1d334
Fixing hazelcast bootstrap issue.
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
core/net/src/test/java/org/onlab/onos/net/device/impl/DistributedDeviceManagerTest.java
core/store/src/main/java/org/onlab/onos/store/impl/StoreManager.java
core/net/src/test/java/org/onlab/onos/net/device/impl/DistributedDeviceManagerTest.java
View file @
85ff08b
package
org
.
onlab
.
onos
.
net
.
device
.
impl
;
import
com.hazelcast.core.HazelcastInstance
;
import
org.junit.After
;
import
org.junit.Before
;
import
org.junit.Test
;
...
...
@@ -23,6 +24,7 @@ import org.onlab.onos.net.device.PortDescription;
import
org.onlab.onos.net.provider.AbstractProvider
;
import
org.onlab.onos.net.provider.ProviderId
;
import
org.onlab.onos.event.impl.TestEventDispatcher
;
import
org.onlab.onos.store.StoreService
;
import
org.onlab.onos.store.device.impl.DistributedDeviceStore
;
import
com.google.common.collect.Iterables
;
...
...
@@ -76,7 +78,6 @@ public class DistributedDeviceManagerTest {
service
=
mgr
;
admin
=
mgr
;
registry
=
mgr
;
dstore
=
new
DistributedDeviceStore
();
// FIXME should be reading the hazelcast.xml
Config
config
=
new
Config
();
// avoid accidentally joining other cluster
...
...
@@ -88,7 +89,7 @@ public class DistributedDeviceManagerTest {
config
.
getNetworkConfig
().
getJoin
()
.
getMulticastConfig
()
.
setEnabled
(
false
);
dstore
.
theInstance
=
Hazelcast
.
newHazelcastInstance
(
config
);
dstore
=
new
TestDistributedDeviceStore
(
Hazelcast
.
newHazelcastInstance
(
config
)
);
dstore
.
activate
();
mgr
.
store
=
dstore
;
mgr
.
eventDispatcher
=
new
TestEventDispatcher
();
...
...
@@ -280,4 +281,14 @@ public class DistributedDeviceManagerTest {
}
}
private
class
TestDistributedDeviceStore
extends
DistributedDeviceStore
{
public
TestDistributedDeviceStore
(
final
HazelcastInstance
hazelcastInstance
)
{
storeService
=
new
StoreService
()
{
@Override
public
HazelcastInstance
getHazelcastInstance
()
{
return
hazelcastInstance
;
}
};
}
}
}
...
...
core/store/src/main/java/org/onlab/onos/store/impl/StoreManager.java
View file @
85ff08b
...
...
@@ -19,7 +19,7 @@ public class StoreManager implements StoreService {
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
getClass
());
pr
ivate
HazelcastInstance
instance
;
pr
otected
HazelcastInstance
instance
;
@Activate
public
void
activate
()
{
...
...
Please
register
or
login
to post a comment