coolbeevip opened a new issue #2224: Test fails
URL: https://github.com/apache/bookkeeper/issues/2224
 
 
   **QUESTION**
   
   According to the developer documents 
https://cwiki.apache.org/confluence/display/BOOKKEEPER/Developer+Setup, I 
failed to build & test base the master branch
   
   **Operating system && JVM**
   
   java version "1.8.0_201"
   Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
   Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
   
   Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 
2018-10-25T02:41:47+08:00)
   
   OS name: "mac os x", version: "10.14.3", arch: "x86_64", family: "mac"
   
   The error is as follows
   
   ```bash
   mvn clean package 
   ...
   ...
   [INFO] Running org.apache.bookkeeper.bookie.GarbageCollectorThreadTest
   [ERROR] Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 
1.097 s <<< FAILURE! - in 
org.apache.bookkeeper.bookie.GarbageCollectorThreadTest
   [ERROR] 
testCompactEntryLogWithException(org.apache.bookkeeper.bookie.GarbageCollectorThreadTest)
  Time elapsed: 0.145 s  <<< ERROR!
   org.mockito.exceptions.misusing.InjectMocksException:
   
   Cannot instantiate @InjectMocks field named 'mockGCThread' of type 'class 
org.apache.bookkeeper.bookie.GarbageCollectorThread'.
   You haven't provided the instance at field declaration so I tried to 
construct the instance.
   However the constructor or the initialization block threw an exception : 
Trying to listen on loopback address, 127.0.0.1:3181 but this is forbidden by 
default (see ServerConfiguration#getAllowLoopback()).
   If this happen, you can consider specifying the network interface to listen 
on (e.g. listeningInterface=eth0) or specifying the advertised address (e.g. 
advertisedAddress=172.x.y.z)
   
        at 
org.apache.bookkeeper.bookie.GarbageCollectorThreadTest.setUp(GarbageCollectorThreadTest.java:64)
   Caused by: java.net.UnknownHostException:
   Trying to listen on loopback address, 127.0.0.1:3181 but this is forbidden 
by default (see ServerConfiguration#getAllowLoopback()).
   If this happen, you can consider specifying the network interface to listen 
on (e.g. listeningInterface=eth0) or specifying the advertised address (e.g. 
advertisedAddress=172.x.y.z)
        at 
org.apache.bookkeeper.bookie.GarbageCollectorThreadTest.setUp(GarbageCollectorThreadTest.java:64)
   
   [ERROR] 
testCompactEntryLogWithException(org.apache.bookkeeper.bookie.GarbageCollectorThreadTest)
  Time elapsed: 0.003 s  <<< ERROR!
   org.mockito.exceptions.misusing.InjectMocksException:
   
   Cannot instantiate @InjectMocks field named 'mockGCThread' of type 'class 
org.apache.bookkeeper.bookie.GarbageCollectorThread'.
   You haven't provided the instance at field declaration so I tried to 
construct the instance.
   However the constructor or the initialization block threw an exception : 
Trying to listen on loopback address, 127.0.0.1:3181 but this is forbidden by 
default (see ServerConfiguration#getAllowLoopback()).
   If this happen, you can consider specifying the network interface to listen 
on (e.g. listeningInterface=eth0) or specifying the advertised address (e.g. 
advertisedAddress=172.x.y.z)
   
        at 
org.apache.bookkeeper.bookie.GarbageCollectorThreadTest.setUp(GarbageCollectorThreadTest.java:64)
   Caused by: java.net.UnknownHostException:
   Trying to listen on loopback address, 127.0.0.1:3181 but this is forbidden 
by default (see ServerConfiguration#getAllowLoopback()).
   If this happen, you can consider specifying the network interface to listen 
on (e.g. listeningInterface=eth0) or specifying the advertised address (e.g. 
advertisedAddress=172.x.y.z)
        at 
org.apache.bookkeeper.bookie.GarbageCollectorThreadTest.setUp(GarbageCollectorThreadTest.java:64)
   
   [ERROR] 
testCompactEntryLogWithException(org.apache.bookkeeper.bookie.GarbageCollectorThreadTest)
  Time elapsed: 0.002 s  <<< ERROR!
   org.mockito.exceptions.misusing.InjectMocksException:
   
   Cannot instantiate @InjectMocks field named 'mockGCThread' of type 'class 
org.apache.bookkeeper.bookie.GarbageCollectorThread'.
   You haven't provided the instance at field declaration so I tried to 
construct the instance.
   However the constructor or the initialization block threw an exception : 
Trying to listen on loopback address, 127.0.0.1:3181 but this is forbidden by 
default (see ServerConfiguration#getAllowLoopback()).
   If this happen, you can consider specifying the network interface to listen 
on (e.g. listeningInterface=eth0) or specifying the advertised address (e.g. 
advertisedAddress=172.x.y.z)
   
        at 
org.apache.bookkeeper.bookie.GarbageCollectorThreadTest.setUp(GarbageCollectorThreadTest.java:64)
   Caused by: java.net.UnknownHostException:
   Trying to listen on loopback address, 127.0.0.1:3181 but this is forbidden 
by default (see ServerConfiguration#getAllowLoopback()).
   If this happen, you can consider specifying the network interface to listen 
on (e.g. listeningInterface=eth0) or specifying the advertised address (e.g. 
advertisedAddress=172.x.y.z)
        at 
org.apache.bookkeeper.bookie.GarbageCollectorThreadTest.setUp(GarbageCollectorThreadTest.java:64)
   
   [INFO] Running org.apache.bookkeeper.bookie.CompactionByEntriesTest
   [INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
66.694 s - in org.apache.bookkeeper.bookie.CompactionByEntriesTest
   [INFO] Running org.apache.bookkeeper.bookie.CheckpointOnNewLedgersTest
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.936 
s - in org.apache.bookkeeper.bookie.CheckpointOnNewLedgersTest
   [INFO] Running org.apache.bookkeeper.bookie.BookieWriteToJournalTest
   [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.401 
s - in org.apache.bookkeeper.bookie.BookieWriteToJournalTest
   [INFO] Running org.apache.bookkeeper.bookie.TestLedgerDirsManager
   [INFO] Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
5.879 s - in org.apache.bookkeeper.bookie.TestLedgerDirsManager
   [INFO] Running org.apache.bookkeeper.bookie.IndexPersistenceMgrTest
   [INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.335 
s - in org.apache.bookkeeper.bookie.IndexPersistenceMgrTest
   [INFO] Running org.apache.bookkeeper.bookie.UpgradeTest
   [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.775 
s - in org.apache.bookkeeper.bookie.UpgradeTest
   [INFO] Running org.apache.bookkeeper.bookie.LedgerCacheTest
   [INFO] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
1.436 s - in org.apache.bookkeeper.bookie.LedgerCacheTest
   [INFO] Running org.apache.bookkeeper.bookie.CompactionByBytesTest
   [INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
67.663 s - in org.apache.bookkeeper.bookie.CompactionByBytesTest
   [INFO] Running org.apache.bookkeeper.bookie.IndexCorruptionTest
   [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 68.95 
s - in org.apache.bookkeeper.bookie.IndexCorruptionTest
   [INFO]
   [INFO] Results:
   [INFO]
   [ERROR] Errors:
   [ERROR] 
org.apache.bookkeeper.bookie.GarbageCollectorThreadTest.testCompactEntryLogWithException(org.apache.bookkeeper.bookie.GarbageCollectorThreadTest)
   [ERROR]   Run 1: GarbageCollectorThreadTest.setUp:64 InjectMocks
   Cannot instantiate @InjectMoc...
   [ERROR]   Run 2: GarbageCollectorThreadTest.setUp:64 InjectMocks
   Cannot instantiate @InjectMoc...
   [ERROR]   Run 3: GarbageCollectorThreadTest.setUp:64 InjectMocks
   Cannot instantiate @InjectMoc...
   [INFO]
   [WARNING] Flakes:
   [WARNING] 
org.apache.bookkeeper.client.SlowBookieTest.testManyBookieFailureWithSlowBookies(org.apache.bookkeeper.client.SlowBookieTest)
   [ERROR]   Run 1: SlowBookieTest.testManyBookieFailureWithSlowBookies:364 
There should be no missing fragments expected:<0> but was:<1>
   [ERROR]   Run 2: SlowBookieTest.testManyBookieFailureWithSlowBookies:364 
There should be no missing fragments expected:<0> but was:<1>
   [INFO]   Run 3: PASS
   [INFO]
   [WARNING] 
org.apache.bookkeeper.replication.BookieAutoRecoveryTest.testEmptyLedgerLosesQuorumEventually(org.apache.bookkeeper.replication.BookieAutoRecoveryTest)
   [ERROR]   Run 1: 
BookieAutoRecoveryTest.testEmptyLedgerLosesQuorumEventually:393 Should be 
marked as replicated
   [INFO]   Run 2: PASS
   [INFO]
   [INFO]
   [ERROR] Tests run: 1554, Failures: 0, Errors: 1, Skipped: 17, Flakes: 2
   [INFO]
   [INFO] 
------------------------------------------------------------------------
   [INFO] Reactor Summary for Apache BookKeeper :: Parent 4.11.0-SNAPSHOT:
   [INFO]
   [INFO] Apache BookKeeper :: Parent ........................ SUCCESS [  1.599 
s]
   [INFO] Apache BookKeeper :: Build Tools ................... SUCCESS [  0.599 
s]
   [INFO] Apache BookKeeper :: Circe Checksum Library ........ SUCCESS [ 17.247 
s]
   [INFO] Apache BookKeeper :: Stats API ..................... SUCCESS [  2.348 
s]
   [INFO] Apache BookKeeper :: CPU Affinity Library .......... SUCCESS [  6.776 
s]
   [INFO] Apache BookKeeper :: Common ........................ SUCCESS [ 20.766 
s]
   [INFO] Apache BookKeeper :: Common :: Allocator ........... SUCCESS [  2.543 
s]
   [INFO] Apache BookKeeper :: Stats :: Parent ............... SUCCESS [  0.062 
s]
   [INFO] Apache BookKeeper :: Stats :: Utils ................ SUCCESS [  0.819 
s]
   [INFO] Apache BookKeeper :: Protocols ..................... SUCCESS [  3.605 
s]
   [INFO] Apache BookKeeper :: Tools :: Parent ............... SUCCESS [  0.044 
s]
   [INFO] Apache BookKeeper :: Tools :: Framework ............ SUCCESS [  2.455 
s]
   [INFO] Apache BookKeeper :: Http :: Http Server ........... SUCCESS [  0.882 
s]
   [INFO] Apache BookKeeper :: Stats Providers :: Prometheus . SUCCESS [  3.813 
s]
   [INFO] Apache BookKeeper :: Bookkeeper Http :: Vertx Http Server SUCCESS [  
2.909 s]
   [INFO] Apache BookKeeper :: Server ........................ FAILURE [  01:25 
h]
   [INFO] Apache BookKeeper :: Benchmark ..................... SKIPPED
   [INFO] Apache BookKeeper :: Stats Providers :: Codahale Metrics SKIPPED
   [INFO] Apache BookKeeper :: Stats Providers ............... SKIPPED
   [INFO] Apache BookKeeper :: Bookkeeper Http :: Twitter Http Server SKIPPED
   [INFO] Apache BookKeeper :: Http .......................... SKIPPED
   [INFO] Apache BookKeeper :: DistributedLog :: Parent ...... SKIPPED
   [INFO] Apache BookKeeper :: DistributedLog :: Common ...... SKIPPED
   [INFO] Apache BookKeeper :: DistributedLog :: Protocol .... SKIPPED
   [INFO] Apache BookKeeper :: DistributedLog :: Core Library  SKIPPED
   [INFO] Apache BookKeeper :: DistributedLog :: IO :: FileSystem SKIPPED
   [INFO] Apache BookKeeper :: DistributedLog :: IO .......... SKIPPED
   [INFO] Apache BookKeeper :: Tools :: Ledger ............... SKIPPED
   [INFO] Apache BookKeeper :: Tools ......................... SKIPPED
   [INFO] Apache BookKeeper :: Metadata Drivers :: Parent .... SKIPPED
   [INFO] Apache BookKeeper :: Metadata Drivers:: Etcd ....... SKIPPED
   [INFO] Apache BookKeeper :: Dist (Parent) ................. SKIPPED
   [INFO] Apache BookKeeper :: Dist (All) .................... SKIPPED
   [INFO] Apache BookKeeper :: Dist (Server) ................. SKIPPED
   [INFO] Apache BookKeeper :: Dist (Bkctl) .................. SKIPPED
   [INFO] Apache BookKeeper :: Shaded :: Parent .............. SKIPPED
   [INFO] Apache BookKeeper :: Shaded :: bookkeeper-server-shaded SKIPPED
   [INFO] Apache BookKeeper :: Shaded :: bookkeeper-server-tests-shaded SKIPPED
   [INFO] Apache BookKeeper :: Shaded :: distributedlog-core-shaded SKIPPED
   [INFO] Apache BookKeeper :: microbenchmarks ............... SKIPPED
   [INFO] Apache BookKeeper :: Tests ......................... SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Test Shaded Jars ..... SKIPPED
   [INFO] Apache BookKeeper :: Tests :: bookkeeper-server-shaded test SKIPPED
   [INFO] Apache BookKeeper :: Tests :: bookkeeper-server-tests-shaded test 
SKIPPED
   [INFO] Apache BookKeeper :: Tests :: distributedlog-core-shaded test SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Docker Images ........ SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Docker Images :: All Released Versions 
SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Docker Images :: All Versions SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Docker Images :: Current Version SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Utility module for Arquillian based 
integration tests SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Common topologies for Docker based 
integration tests SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Base module for Arquillian based 
integration tests SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Base module for Arquillian based 
integration tests using groovy SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Backward Compatibility SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Backward Compatibility :: Test upgrade 
between all released versions and current version SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Backward Compatibility :: Test upgrade 
between 4.1.0 and current version SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Backward Compatibility :: Test compat 
between old version and new version of hierarchical ledger manager SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Backward Compatibility :: Test upgrade 
between 4.1.0 and current version (with hostname bookie ID) SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Backward Compatibility :: Test recovery 
does not work when password no in metadata SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Backward Compatibility :: Test upgrade 
4.1.0 to current in cluster with cookies SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Backward Compatibility :: Test old 
clients working on current server SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Backward Compatibility :: Test upgrade 
between yahoo custom version and current SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Integration .......... SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Integration :: Smoke test SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Integration :: Standalone test SKIPPED
   [INFO] Apache BookKeeper :: Tests :: Bash Scripts Test .... SKIPPED
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  01:27 h
   [INFO] Finished at: 2019-12-27T14:46:16+08:00
   [INFO] 
------------------------------------------------------------------------
   [ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on 
project bookkeeper-server: There was a timeout or other error in the fork -> 
[Help 1]
   [ERROR]
   [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
   [ERROR] Re-run Maven using the -X switch to enable full debug logging.
   [ERROR]
   [ERROR] For more information about the errors and possible solutions, please 
read the following articles:
   [ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
   [ERROR]
   [ERROR] After correcting the problems, you can resume the build with the 
command
   [ERROR]   mvn <goals> -rf :bookkeeper-server
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to