Hi all,

I am attempting to fix the tests for the current master branch.
https://github.com/apache/usergrid/pull/598 solves one such test broken due
to the last merge. Please merge that.

At the same time, there are a few other tests breaking, but exhibit
inconsistent behavior

mvn -pl services test

[INFO] Usergrid Services .................................. FAILURE [11:52
min]

-------------------------------------------------------------------------------
Test set: org.apache.usergrid.management.OrganizationConfigIT
-------------------------------------------------------------------------------
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.88 sec
<<< FAILURE! - in org.apache.usergrid.management.OrganizationConfigIT
testNonOrgProperty(org.apache.usergrid.management.OrganizationConfigIT)
Time elapsed: 0.097 sec  <<< ERROR!
java.lang.NullPointerException: null
at
org.apache.shiro.mgt.AuthorizingSecurityManager.hasRole(AuthorizingSecurityManager.java:153)
at
org.apache.shiro.subject.support.DelegatingSubject.hasRole(DelegatingSubject.java:224)
at
org.apache.usergrid.security.shiro.utils.SubjectUtils.isServiceAdmin(SubjectUtils.java:285)
at
org.apache.usergrid.services.AbstractService.checkPermissionsForPath(AbstractService.java:1359)
at
org.apache.usergrid.services.AbstractService.checkPermissionsForCollection(AbstractService.java:1325)
at
org.apache.usergrid.services.AbstractCollectionService.postCollection(AbstractCollectionService.java:411)
at
org.apache.usergrid.services.groups.activities.ActivitiesService.postCollection(ActivitiesService.java:50)
at
org.apache.usergrid.services.AbstractService.invokeCollection(AbstractService.java:811)


But if I run this test individually, it works fine.

mvn -pl services test -Dtest=OrganizationConfigIT

Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.352 sec -
in org.apache.usergrid.management.OrganizationConfigIT
2018-09-04 09:21:37,253 INFO (Thread-4) ActorSystemManagerImpl - Downing
self: akka.tcp://ClusterSystem@localhost:2551 from cluster: ClusterSystem

Results :

Tests run: 3, Failures: 0, Errors: 0, Skipped: 0

[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 59.764 s
[INFO] Finished at: 2018-09-04T09:21:37-07:00
[INFO]
------------------------------------------------------------------------


This test has 3 Rules :

@Rule

    public ClearShiroSubject clearShiroSubject = new ClearShiroSubject();


    @ClassRule

    public static ServiceITSetup setup = new ServiceITSetupImpl();


    @Rule

    public NewOrgAppAdminRule newOrgAppAdminRule = new NewOrgAppAdminRule(
setup );

The NewOrgAppAdminRule gets called for all the methods, and the error is
thrown during this rule execution. The same rule executes successfully for
the other methods.
I added a couple of new dummy methods, and what I observed is that this
error gets thrown for the LAST method that is going to be tested.

Do any of you have prior experience on this behavior?





On Tue, Aug 28, 2018 at 8:15 AM Todd Nine <[email protected]> wrote:

> Looks like you'll need Cassandra Running locally. I can't seem to connect
> to it to run the data access integration tests.  See the connection to
> localhost port 9042 below.
>
> 1) Error injecting constructor,
> com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s)
> tried for query failed (tried: localhost/127.0.0.1:9042
> (com.datastax.driver.core.TransportException: [localhost/127.0.0.1:9042]
> Cannot connect))
>   at
> org.apache.usergrid.persiste
>
> On Tue, Aug 28, 2018 at 7:41 AM Rod Simpson <[email protected]> wrote:
>
> > Hello all,
> >
> > I am unable to get the tests to run.  I have tried the last 5 commits,
> but
> > I get the same error:
> >
> > Tests in error:
> >
> >
> >
> ColumnNameIteratorTest.org.apache.usergrid.persistence.core.astyanax.ColumnNameIteratorTest
> > » Creation
> >
> >
> >
> MultiKeyColumnNameIteratorTest.org.apache.usergrid.persistence.core.astyanax.MultiKeyColumnNameIteratorTest
> > » Creation
> >
> >
> >
> MultiRowColumnIteratorTest.org.apache.usergrid.persistence.core.astyanax.MultiRowColumnIteratorTest
> > » Creation
> >
> >
> >
> MigrationInfoSerializationTest.org.apache.usergrid.persistence.core.migration.data.MigrationInfoSerializationTest
> > » Creation
> >
> >
> >
> DataStaxClusterTest.org.apache.usergrid.persistence.core.datastax.DataStaxClusterTest
> > » Creation
> >
>  CQLUtilsTest.org.apache.usergrid.persistence.core.datastax.CQLUtilsTest »
> > Creation
> >
> >
> >
> > They fail in the same place for all of the last 5 commits:
> >
> > 2018-08-28 07:24:37 INFO driver.core.ClockFactory.newInstance(52)<main>-
> > Using native clock to generate timestamps.
> > Tests run: 5, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 1.82 sec
> > <<< FAILURE! - in
> > org.apache.usergrid.persistence.core.astyanax.MultiRowColumnIteratorTest
> > org.apache.usergrid.persistence.core.astyanax.ColumnNameIteratorTest
> Time
> > elapsed: 1.699 sec  <<< ERROR!
> > com.google.inject.CreationException: Unable to create injector, see the
> > following errors:
> >
> > 1) Error injecting constructor,
> > com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s)
> > tried for query failed (tried: localhost/127.0.0.1:9042
> > (com.datastax.driver.core.TransportException: [localhost/127.0.0.1:9042]
> > Cannot connect))
> >   at
> >
> >
> org.apache.usergrid.persistence.core.datastax.impl.DataStaxClusterImpl.<init>(DataStaxClusterImpl.java:51)
> >   at
> >
> >
> org.apache.usergrid.persistence.core.datastax.impl.DataStaxClusterImpl.class(DataStaxClusterImpl.java:41)
> >   while locating
> > org.apache.usergrid.persistence.core.datastax.impl.DataStaxClusterImpl
> >   at
> >
> >
> org.apache.usergrid.persistence.core.guice.CommonModule.configure(CommonModule.java:71)
> > (via modules: org.apache.usergrid.persistence.core.test.ITRunner$1 ->
> > org.apache.usergrid.persistence.core.guice.TestCommonModule ->
> > org.apache.usergrid.persistence.core.guice.CommonModule)
> >   while locating
> > org.apache.usergrid.persistence.core.datastax.DataStaxCluster
> > Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException:
> > All host(s) tried for query failed (tried: localhost/127.0.0.1:9042
> > (com.datastax.driver.core.TransportException: [localhost/127.0.0.1:9042]
> > Cannot connect))
> > at
> >
> >
> com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:240)
> > at
> >
> >
> com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:86)
> > at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1455)
> > at com.datastax.driver.core.Cluster.getMetadata(Cluster.java:398)
> > at
> >
> >
> org.apache.usergrid.persistence.core.datastax.impl.DataStaxClusterImpl.<init>(DataStaxClusterImpl.java:56)
> > at
> >
> >
> org.apache.usergrid.persistence.core.datastax.impl.DataStaxClusterImpl$$FastClassByGuice$$215c14fd.newInstance(<generated>)
> > at
> >
> >
> com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
> > at
> >
> >
> com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
> > at
> >
> >
> com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
> > at
> >
> >
> com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
> > at
> >
> >
> com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
> > at
> >
> >
> com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
> > at
> >
> >
> com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
> > at
> >
> >
> com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
> > at com.google.inject.Scopes$1$1.get(Scopes.java:65)
> > at
> >
> >
> com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
> > at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
> > at
> >
> >
> com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
> > at
> >
> >
> com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
> > at
> >
> >
> com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
> > at com.google.inject.Scopes$1$1.get(Scopes.java:65)
> > at
> >
> >
> com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
> > at
> >
> >
> com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
> > at
> >
> >
> com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
> > at
> >
> >
> com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1059)
> > at
> >
> >
> com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
> > at
> >
> >
> com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
> > at
> >
> >
> com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
> > at com.google.inject.Guice.createInjector(Guice.java:96)
> > at com.google.inject.Guice.createInjector(Guice.java:73)
> > at com.google.inject.Guice.createInjector(Guice.java:62)
> > at
> >
> >
> org.apache.usergrid.persistence.core.test.ITRunner.createInjector(ITRunner.java:101)
> > at
> >
> org.apache.usergrid.persistence.core.test.ITRunner.inject(ITRunner.java:64)
> > at
> >
> >
> org.apache.usergrid.persistence.core.test.ITRunner.methodInvoker(ITRunner.java:57)
> > at
> >
> >
> org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:251)
> > at
> >
> >
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> > at
> >
> >
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> > at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> > at org.junit.runners.Suite.runChild(Suite.java:127)
> > at org.junit.runners.Suite.runChild(Suite.java:26)
> > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> > at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> > at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
> > at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
> > at
> >
> >
> org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:141)
> > at
> >
> >
> org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:114)
> > at
> >
> >
> org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:86)
> > at
> >
> >
> org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:134)
> > at
> >
> >
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
> > at
> >
> >
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
> > at
> > org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> >
> >
> >
> >
> > I'm wondering if I have something set up incorrectly on my machine.
> >
> > Thoughts?
> >
> > Rod
> >
>

Reply via email to