You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@rya.apache.org by "David W. Lotts (JIRA)" <ji...@apache.org> on 2017/09/06 19:40:02 UTC

[jira] [Created] (RYA-363) Unit tests fail with no information when mongoDB fails to start

David W. Lotts created RYA-363:
----------------------------------

             Summary: Unit tests fail with no information when mongoDB fails to start 
                 Key: RYA-363
                 URL: https://issues.apache.org/jira/browse/RYA-363
             Project: Rya
          Issue Type: Improvement
    Affects Versions: 3.2.11
            Reporter: David W. Lotts
            Assignee: Andrew Smith
            Priority: Minor
             Fix For: 3.2.12


When MockMongoFactory  fails for whatever reason, the logs do not show an error unless log4J is configured and INFO is logged.  This is not the case for a standard "mvn clean install" so all you see is this: 

> java.lang.NullPointerException: null
> at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
> at org.apache.rya.mongodb.MongoDBRdfConfiguration.setMongoClient( MongoDBRdfConfiguration.java:267) ...

Change it so that it always shows an error that contains some indication of the root cause -- even if it says that mongodb failed to initialize, better would  be to show the mongdb output, like below.
This should be in the \[ERROR\] log, not the \[INFO\]
{code}

2017-08-31 14:24:48,466 INFO  [Thread-3] mongodb.MockMongoFactory (Slf4jLevel.java:log(42)) -
[initandlisten] terminate() called. An exception is active; attempting to gather more information[mongod output]
[initandlisten] std::exception::what(): Resource temporarily unavailable[mongod output]
Actual exception type: std::system_error[mongod output] 

{code}







--
This message was sent by Atlassian JIRA
(v6.4.14#64029)