Giter Site home page Giter Site logo

rh-messaging / cli-proton-ruby Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 268 KB

cli-proton-ruby is a collection of commandline messaging clients suitable for interacting with Message Oriented Middleware such as ActiveMQ Artemis broker or Qpid Dispatch router.

License: Apache License 2.0

Ruby 98.74% Shell 1.26%
amqp amqp10 messaging

cli-proton-ruby's People

Contributors

alanconway avatar els-pnw avatar jiridanek avatar pematous avatar rkubis avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cli-proton-ruby's Issues

Implement --msg-priority sender option

All the JAMQMsgPatterns message priority tests fail with

stderr: "/home/jdanek/Work/repos/cli-proton-ruby/lib/options/sr_common_option_parser.rb:55:in `parse\': invalid option: --msg-priority (OptionParser::InvalidOption)"

Example client invocation

cli: "aacf"
type: "sender"
options: "--msg-priority"
options: "0"
options: "--log-msgs"
options: "dict"
options: "--count"
options: "1"
options: "--msg-durable"
options: "False"
options: "--broker"
options: "amqp://127.0.0.1:5672/unknowntestYou0icd"
wrapperOptions {
}

Broken CI, too old ruby in docker image

$ docker run -v `pwd`:/mnt --rm --network swarmnet jdanekrh/docker-qpid-proton-clients:devel /mnt/scripts/docker-tests.sh

	rake requires Ruby version >= 2.2.

initest:

	minitest requires Ruby version < 3.1, >= 2.2.

Parsing documentation for qpid_proton-0.26.0

Installing ri documentation for qpid_proton-0.26.0

1 gem installed

/mnt/scripts/docker-tests.sh: line 11: rake: command not found

/mnt/scripts/docker-tests.sh: line 11: rake: command not found

Implement --msg-property sender option

In JAMQMessagefffTests test_direct_transient_empty_message_with_float_property

stderr: "/home/jdanek/Work/repos/cli-proton-ruby/lib/options/sr_common_option_parser.rb:55:in `parse\': invalid option: --msg-property (OptionParser::InvalidOption)"
cli: "aacf"
type: "sender"
options: "--log-msgs"
options: "dict"
options: "--count"
options: "10"
options: "--msg-property"
options: "key1~10.5"
options: "--timeout"
options: "2"
options: "--broker"
options: "amqp://127.0.0.1:5672/JAMQMessagefffTestsO7D8nmR"
wrapperOptions {
}

Curb the number of constructor arguments to Handler classes

Currently, we have

  class ReceiverHandler < Handlers::SRCommonHandler

[...]

    def initialize(
      broker,
      log_msgs,
      count,
      process_reply_to,
      browse,
      sasl_mechs,
      exit_timer=nil
    )

[...]

The argument count is going to go up as we are adding more options, likely approaching 20 or even more. This should be rewritten somehow.

Possibly pass the options object in there directly.

Implement --auto-settle-off receiver and sender option

Test test_reply_to_address in JAMQMsgPatternsfffTests fails with

stderr: "/home/jdanek/Work/repos/cli-proton-ruby/lib/options/sr_common_option_parser.rb:55:in `parse\': invalid option: --reactor-auto-settle-off (OptionParser::InvalidOption)"

Example client invocation

cli: "aacf"
type: "sender"
options: "--log-msgs"
options: "dict"
options: "--count"
options: "4"
options: "--broker"
options: "amqp://127.0.0.1:5672/JAMQMsgPatternsfffTestsNm8HjYj"
options: "--msg-reply-to"
options: "JAMQMsgPatternsfffTestsNm8HjYj-replyQ"
options: "--msg-content-map"
options: "text=Reply to message delivery test with random string replyQ_4"
wrapperOptions {
}

[cli-proton-ruby] Fix randomly failing self-tests

The test failure is caused by test

  def test_receiver_option_parser_user_timeout_value_short_float
    user_receiver_options_timeout_short_float = \
      Options::ReceiverOptionParser.new(["-t", "0.7"])
    assert_equal(
      0.7,
      user_receiver_options_timeout_short_float.options.exit_timer.timeout
    )
  end # test_receiver_option_parser_user_timeout_value_short_float

This means that the tests have 0.7 s to run, before the exit_timer that was triggered by this test fires and kills the test process. Which is interpreted as test failure.

Implement --msg-id sender option

In JAMQMessagefffTests test_direct_transient_empty_message_with_id_property

stderr: "/home/jdanek/Work/repos/cli-proton-ruby/lib/options/sr_common_option_parser.rb:55:in `parse\': invalid option: --msg-id (OptionParser::InvalidOption)"
cli: "aacf"
type: "sender"
options: "--log-msgs"
options: "dict"
options: "--count"
options: "1"
options: "--msg-id"
options: "test-string-id-1520603550.047760"
options: "--timeout"
options: "2"
options: "--broker"
options: "amqp://127.0.0.1:5672/JAMQMessagefffTests7EKGhXI"
wrapperOptions {
}

implement --content-type sender option

Test test_publish_subscribe_int in JAMQMsgPatternsfffTests fails with message

stderr: "/home/jdanek/Work/repos/cli-proton-ruby/lib/options/sr_common_option_parser.rb:55:in `parse\': invalid option: --content-type (OptionParser::InvalidOption)"

Example client invocation

cli: "aacf"
type: "sender"
options: "--msg-content"
options: "12345"
options: "--log-msgs"
options: "dict"
options: "--count"
options: "3"
options: "--content-type"
options: "int"
options: "--broker"
options: "amqp://127.0.0.1:5672/topic://JAMQMsgPatternsfffTestsnxTwlvp"
wrapperOptions {
}

Implement --recv-selector receiver option

Essentially all tests in JAMQMsgSelectorfffTests are affected

stderr: "/home/jdanek/Work/repos/cli-proton-ruby/lib/options/sr_common_option_parser.rb:55:in `parse\': invalid option: --recv-selector (OptionParser::InvalidOption)"
cli: "aacf"
type: "receiver"
options: "--log-msgs"
options: "dict"
options: "--count"
options: "0"
options: "--recv-selector"
options: "%a = \'aeshah1M\'"
options: "--timeout"
options: "2"
options: "--broker"
options: "amqp://127.0.0.1:5672/unknowntestSdFU4pF"
wrapperOptions {
}

remove_id_prefix: undefined method `delete_prefix' in interop_formatter

https://master-jenkins-csb-amq-clients-qe.cloud.paas.psi.redhat.com/view/AMQ_Clients/job/tests/job/linux/job/dtests-amq-clients-interoperability/105/

'stderr': ['/var/dtests/node_data/clients/cli-proton-ruby/lib/formatters/interop_formatter.rb:53:in '
                "`remove_id_prefix': undefined method `delete_prefix' for "
                '"ID:2a37626a-8cd6-42bd-b8f8-c67b12f5ef91:1:1:1-1":String '
                '(NoMethodError)',
                '\tfrom '
                '/var/dtests/node_data/clients/cli-proton-ruby/lib/formatters/interop_formatter.rb:70:in '
                "`get_as_interop_dictionary'",
                '\tfrom '
                '/var/dtests/node_data/clients/cli-proton-ruby/lib/formatters/interop_formatter.rb:95:in '
                "`print'",
                '\tfrom '
                '/var/dtests/node_data/clients/cli-proton-ruby/lib/handlers/sr_common_handler.rb:87:in '
                "`print_message'",
                '\tfrom '
                '/var/dtests/node_data/clients/cli-proton-ruby/lib/handlers/receiver_handler.rb:156:in '
                "`on_message'",
                '\tfrom '
                '/usr/share/gems/gems/qpid_proton-0.33.0/lib/handler/adapter.rb:74:in '
                "`forward'",
                '\tfrom '
                '/usr/share/gems/gems/qpid_proton-0.33.0/lib/handler/messaging_adapter.rb:27:in '
                "`delegate'",
                '\tfrom '
                '/usr/share/gems/gems/qpid_proton-0.33.0/lib/handler/messaging_adapter.rb:108:in '
                "`on_delivery'",
                '\tfrom '
                '/usr/share/gems/gems/qpid_proton-0.33.0/lib/core/event.rb:94:in '
                "`dispatch'",
                '\tfrom '
                '/usr/share/gems/gems/qpid_proton-0.33.0/lib/core/connection_driver.rb:194:in '
                "`block in dispatch'",
                '\tfrom '
                '/usr/share/gems/gems/qpid_proton-0.33.0/lib/core/connection_driver.rb:78:in '
                "`each_event'",
                '\tfrom '
                '/usr/share/gems/gems/qpid_proton-0.33.0/lib/core/connection_driver.rb:188:in '
                "`dispatch'",
                '\tfrom '
                '/usr/share/gems/gems/qpid_proton-0.33.0/lib/core/container.rb:270:in '
                "`dispatch'",
                '\tfrom '
                '/usr/share/gems/gems/qpid_proton-0.33.0/lib/core/connection_driver.rb:204:in '
                "`process'",
                '\tfrom '
                '/usr/share/gems/gems/qpid_proton-0.33.0/lib/core/container.rb:267:in '
                "`process'",
                '\tfrom '
                '/usr/share/gems/gems/qpid_proton-0.33.0/lib/core/container.rb:419:in '
                "`block in run_one'",
                '\tfrom '
                '/usr/share/gems/gems/qpid_proton-0.33.0/lib/core/container.rb:432:in '
                "`maybe_panic'",
                '\tfrom '
                '/usr/share/gems/gems/qpid_proton-0.33.0/lib/core/container.rb:419:in '
                "`run_one'",
                '\tfrom '
                '/usr/share/gems/gems/qpid_proton-0.33.0/lib/core/container.rb:197:in '
                "`run'",
                '\tfrom '
                '/var/dtests/node_data/clients/cli-proton-ruby/lib/receiver_client.rb:56:in '
                "`initialize'",
                '\tfrom '
                '/var/dtests/node_data/clients/cli-proton-ruby-receiver:21:in '
                "`new'",
                '\tfrom '
                '/var/dtests/node_data/clients/cli-proton-ruby-receiver:21:in '
                "`<main>'"],

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.