dimanche 20 août 2017

Figuring out which test case failed in Elasticsearch source

After forking and downloading Elasticsearch, I tried running the tests with gradle check. The execution took 2 hours and as shown in the stack blow there was one error.

   [junit4]     at com.carrotsearch.ant.tasks.junit4.dependencies.com.google.common.eventbus.EventBus.post(EventBus.java:215)
   [junit4]     at com.carrotsearch.ant.tasks.junit4.LocalSlaveStreamHandler.pumpEvents(LocalSlaveStreamHandler.java:260)
   [junit4]     at com.carrotsearch.ant.tasks.junit4.LocalSlaveStreamHandler$2.run(LocalSlaveStreamHandler.java:122)
   [junit4] JVM J0:     0.82 ..  1838.85 =  1838.03s
   [junit4] Execution time total: 30 minutes 38 seconds
   [junit4] Tests summary: 4 suites, 479 tests, 1 suite-level error, 1 error, 14 ignored (14 assumptions)

:distribution:integ-test-zip:integTestRunner FAILED

Cluster distribution_integ-test-zip_integTestCluster - node 0 log excerpt:
(full log at D:\code\elasticsearch\distribution\integ-test-zip\build\cluster\integTestCluster node0\elasticsearch-7.0.0-alpha1-SNAPSHOT\logs\distribution_integ-test-zip_integTestCluster.log)
-----------------------------------------
[2017-08-19T13:27:20,788][INFO ][o.e.n.Node               ] [node-0] initializing ...
[2017-08-19T13:27:21,939][INFO ][o.e.e.NodeEnvironment    ] [node-0] using [1] data paths, mounts [[Data (D:)]], net usable_space [463.9gb], net total_space [537.7gb], types [NTFS]
[2017-08-19T13:27:21,940][INFO ][o.e.e.NodeEnvironment    ] [node-0] heap size [494.9mb], compressed ordinary object pointers [true]
[2017-08-19T13:27:21,952][INFO ][o.e.n.Node               ] [node-0] node name [node-0], node ID [rdZeumUzTDKVkKZ-jFmQVQ]
[2017-08-19T13:27:21,954][INFO ][o.e.n.Node               ] [node-0] version[7.0.0-alpha1-SNAPSHOT], pid[10212], build[96b0d3e/2017-08-19T09:59:15.791Z], OS[Windows 10/10.0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_66/25.66-b18]
[2017-08-19T13:27:21,960][INFO ][o.e.n.Node               ] [node-0] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -XX:+HeapDumpOnOutOfMemoryError, -Xms512m, -Xmx512m, -ea, -esa, -Delasticsearch, -Des.path.home=D:\code\elasticsearch\distribution\integ-test-zip\build\cluster\integTestCluster node0\elasticsearch-7.0.0-alpha1-SNAPSHOT, -Des.path.conf=D:\code\elasticsearch\distribution\integ-test-zip\build\cluster\integTestCluster node0\elasticsearch-7.0.0-alpha1-SNAPSHOT\config]
[2017-08-19T13:27:21,962][WARN ][o.e.n.Node               ] [node-0] version [7.0.0-alpha1-SNAPSHOT] is a pre-release version of Elasticsearch and is not suitable for production
[2017-08-19T13:27:22,722][INFO ][o.e.p.PluginsService     ] [node-0] loaded module [transport-netty4]
[2017-08-19T13:27:22,723][INFO ][o.e.p.PluginsService     ] [node-0] no plugins loaded
[2017-08-19T13:27:27,628][INFO ][o.e.d.DiscoveryModule    ] [node-0] using discovery type [zen]
[2017-08-19T13:27:28,970][INFO ][o.e.n.Node               ] [node-0] initialized
[2017-08-19T13:27:28,971][INFO ][o.e.n.Node               ] [node-0] starting ...
[2017-08-19T13:27:30,355][INFO ][o.e.t.TransportService   ] [node-0] publish_address {127.0.0.1:57028}, bound_addresses {127.0.0.1:57028}, {[::1]:57029}
[2017-08-19T13:27:33,508][INFO ][o.e.c.s.MasterService    ] [node-0] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {node-0}{rdZeumUzTDKVkKZ-jFmQVQ}{xhoZX-qzShG8xxAol46vKQ}{127.0.0.1}{127.0.0.1:57028}{testattr=test}
[2017-08-19T13:27:33,520][INFO ][o.e.c.s.ClusterApplierService] [node-0] new_master {node-0}{rdZeumUzTDKVkKZ-jFmQVQ}{xhoZX-qzShG8xxAol46vKQ}{127.0.0.1}{127.0.0.1:57028}{testattr=test}, reason: apply cluster state (from master [master {node-0}{rdZeumUzTDKVkKZ-jFmQVQ}{xhoZX-qzShG8xxAol46vKQ}{127.0.0.1}{127.0.0.1:57028}{testattr=test} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])
[2017-08-19T13:27:33,644][INFO ][o.e.g.GatewayService     ] [node-0] recovered [0] indices into cluster_state
=========================================
:distribution:integ-test-zip:integTestCluster#stop
:distribution:zip:integTestCluster#stop
:docs:integTestCluster#stop

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':distribution:integ-test-zip:integTestRunner'.
> There were test failures: 4 suites, 479 tests, 1 suite-level error, 1 error, 14 ignored (14 assumptions) [seed: E53884AA64085B30]

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2 hrs 3 mins 42.667 secs

Because executing all tests took so long, I would like to run just the one test that failed. That can be done easily, but the problem is that I don't know which one failed. All it says is What went wrong: failed for task ':distribution:integ-test-zip:integTestRunner'. The error stacktrace is seemingly infinite. It goes up until out of the screen. There are also some errors in the logs, but I can't find anything like a test name.

Is there any way of figuring out which test case failed?

Aucun commentaire:

Enregistrer un commentaire