Facing Issue with running tests of rabbitmq-java-client

85 views
Skip to first unread message

Nikhil Khatwani

unread,
Sep 7, 2016, 8:24:46 AM9/7/16
to rabbitmq-users
I performed following steps but getting errors:
  1. git clone rabbitmq-java-client
  2. make deps as mentioned in RUNNING_TESTS.md 
  3. sudo mvn -Ddeps.dir=./deps/ verify -Dit.test=ClientTests
Rabbitmq is already running on the same box on default port rabbit@localhost

Console output below giving undefined parse transform 'lager_transform'. I searched over stackoverflow 

"Try to put lager to first position in rebar dependency list. it will fix it. rebar ordering compile dependencies according to this list, not dependency tree))".

I am not sure where to make this change and will this fix the issue for not. Also where can i change config from localhost to some different hostname.

[INFO] Building jar: /mnt/rabbitmq-java-client/target/amqp-client-3.7.0-SNAPSHOT.jar

[INFO] 

[INFO] --- groovy-maven-plugin:2.0:execute (start-test-broker-A) @ amqp-client ---

GEN    virgin-node-tmpdir

 DEP    ranch

 DEP    lager

 DEP    goldrush

 DEP    rabbitmq_codegen

 DEP    lager

 DEP    goldrush

 DEPEND ranch.d

 ERLC   ranch.erl ranch_acceptor.erl ranch_acceptors_sup.erl ranch_app.erl ranch_conns_sup.erl ranch_listener_sup.erl ranch_protocol.erl ranch_server.erl ranch_ssl.erl ranch_sup.erl ranch_tcp.erl ranch_transport.erl

 APP    ranch.app.src

 DEPEND goldrush.d

 ERLC   glc.erl glc_code.erl glc_lib.erl glc_ops.erl gr_app.erl gr_context.erl gr_counter.erl gr_counter_sup.erl gr_manager.erl gr_manager_sup.erl gr_param.erl gr_param_sup.erl gr_sup.erl gre.erl

 APP    goldrush.app.src

 DEPEND lager.d

 ERLC   error_logger_lager_h.erl lager.erl lager_app.erl lager_backend_throttle.erl lager_common_test_backend.erl lager_config.erl lager_console_backend.erl lager_crash_log.erl lager_default_formatter.erl lager_file_backend.erl lager_format.erl lager_handler_watcher.erl lager_handler_watcher_sup.erl lager_manager_killer.erl lager_msg.erl lager_stdlib.erl lager_sup.erl lager_transform.erl lager_trunc_io.erl lager_util.erl

 APP    lager.app.src

 GEN    include/rabbit_framing.hrl

 GEN    src/rabbit_framing_amqp_0_8.erl

 GEN    src/rabbit_framing_amqp_0_9_1.erl

 DEPEND rabbit_common.d

 ERLC   app_utils.erl code_version.erl credit_flow.erl gen_server2.erl lager_forwarder_backend.erl mirrored_supervisor.erl mochijson2.erl mochinum.erl pmon.erl priority_queue.erl rabbit_amqqueue.erl rabbit_auth_backend_dummy.erl rabbit_auth_backend_internal.erl rabbit_auth_mechanism.erl rabbit_authn_backend.erl rabbit_authz_backend.erl rabbit_backing_queue.erl rabbit_basic.erl rabbit_binary_generator.erl rabbit_binary_parser.erl rabbit_channel.erl rabbit_channel_interceptor.erl rabbit_command_assembler.erl rabbit_control_misc.erl rabbit_ct_broker_helpers.erl rabbit_ct_helpers.erl rabbit_data_coercion.erl rabbit_error_logger_handler.erl rabbit_event.erl rabbit_exchange_decorator.erl rabbit_exchange_type.erl rabbit_framing_amqp_0_8.erl rabbit_framing_amqp_0_9_1.erl rabbit_health_check.erl rabbit_heartbeat.erl rabbit_misc.erl rabbit_msg_store_index.erl rabbit_net.erl rabbit_networking.erl rabbit_nodes.erl rabbit_password_hashing.erl rabbit_policy_validator.erl rabbit_queue_collector.erl rabbit_queue_decorator.erl rabbit_queue_master_locator.erl rabbit_reader.erl rabbit_registry.erl rabbit_registry_class.erl rabbit_runtime_parameter.erl rabbit_types.erl rabbit_writer.erl supervisor2.erl

src/gen_server2.erl: undefined parse transform 'lager_transform'

make[2]: *** [ebin/rabbit_common.app] Error 1

make[1]: *** [app] Error 2

make: *** [deps] Error 2

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 57.863 s

[INFO] Finished at: 2016-09-07T12:12:15+00:00

[INFO] Final Memory: 36M/177M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.codehaus.gmaven:groovy-maven-plugin:2.0:execute (start-test-broker-A) on project amqp-client: Execution start-test-broker-A of goal org.codehaus.gmaven:groovy-maven-plugin:2.0:execute failed: org.apache.maven.plugin.MojoExecutionException: Failed to manage broker 'rabbit@localhost' with command: make -C ./deps//rabbit --no-print-directory virgin-node-tmpdir start-background-broker DEPS_DIR=./deps/ RABBITMQ_NODENAME=rabbit@localhost RABBITMQ_NODE_PORT=5672 RABBITMQ_CONFIG_FILE=/mnt/rabbitmq-java-client/target/test-classes/rabbit@localhost -> [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/PluginExecutionException

dfed...@pivotal.io

unread,
Sep 7, 2016, 10:29:50 AM9/7/16
to rabbitmq-users
Looks like dependencies haven't been resolved correctly.
If you use 'master' branch, try to refresh dependencies by deleting `deps` dir and running `make deps` again.
If this won't help cd into `deps/rabbit` and run `make`.
This should resolve dependencies and compile server.

Michael Klishin

unread,
Sep 7, 2016, 10:49:00 AM9/7/16
to rabbitm...@googlegroups.com
1. You absolutely do not need `sudo` to run the tests. I'd highly recommend against using `sudo`.
2. Java client test suite will start two RabbitMQ nodes automatically unless you opt out (at least when the entire umbrella is used: I personally haven't tried it in the standalone repo).

I suspect that RUNNING_TESTS can be incomplete since those changes happened in the last month or so.

`src/gen_server2.erl: undefined parse transform 'lager_transform'` means you need to do a `make distclean` and possibly
force a dependency recompilation as Daniil suggests.


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ
Reply all
Reply to author
Forward
0 new messages