addPackage test
This commit is contained in:
parent
6e3a130279
commit
a46421fcce
2 changed files with 5 additions and 2 deletions
|
@ -139,7 +139,10 @@ public final class SessionInitializer extends AbstractSessionOperations {
|
|||
|
||||
public SessionInitializer addPackage(String packageName) {
|
||||
try {
|
||||
PackageUtil.getClasses(packageName).forEach(initList::add);
|
||||
PackageUtil.getClasses(packageName)
|
||||
.stream()
|
||||
.filter(c -> c.isInterface())
|
||||
.forEach(initList::add);
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new CasserException("fail to add package " + packageName, e);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ public class StaticColumnTest extends AbstractEmbeddedCassandraTest {
|
|||
|
||||
@BeforeClass
|
||||
public static void beforeTest() {
|
||||
Casser.init(getSession()).showCql().add(Message.class).autoCreateDrop().singleton();
|
||||
Casser.init(getSession()).showCql().addPackage(Message.class.getPackage().getName()).autoCreateDrop().singleton();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in a new issue