ConstantSchemaAbstractDataBrokerTest, faster than AbstractDataBrokerTest 70/47770/10
authorMichael Vorburger <vorburger@redhat.com>
Thu, 27 Oct 2016 17:27:36 +0000 (19:27 +0200)
committerTom Pantelis <tpanteli@brocade.com>
Wed, 30 Nov 2016 00:06:01 +0000 (00:06 +0000)
commita12683b9e6445f48216ce0ca357dfcf359c8e3b3
tree691d16dd3b2a523fcdc9d86344101ba12d7b224b
parent16c3ed9c435bbcc008ed453358380edf7034f4d5
ConstantSchemaAbstractDataBrokerTest, faster than AbstractDataBrokerTest

In something like AclServiceTest, of which I'm going to be writing a lot
more shortly, which runs e.g. 7 @Test methods under a fresh DataBroker,
there is no need to re-re-re-re do the bloody slow creation of
SchemaContext every time (because its content is based on the classpath,
wihch is fixed for a given single test).

This optimization approx. halfs the time e.g. for AclServiceTest, from
ca. 30s to ca. 15s.

Implemented on the train & ferry traveling back from EclipseCon ;)

Change-Id: Ic47f8abf9833bafcce13655b46cbce3e02aed050
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/test/AbstractDataBrokerTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/test/AbstractSchemaAwareTest.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/test/ConstantSchemaAbstractDataBrokerTest.java [new file with mode: 0644]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/test/DataBrokerTestModule.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/test/SchemaContextSingleton.java [new file with mode: 0644]
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/test/tests/DataBrokerTestModuleTest.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.