From dev-return-70955-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Wed Sep 11 14:47:59 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 4E5D818063F for ; Wed, 11 Sep 2019 16:47:59 +0200 (CEST) Received: (qmail 42796 invoked by uid 500); 11 Sep 2019 14:47:58 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 42776 invoked by uid 99); 11 Sep 2019 14:47:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Sep 2019 14:47:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B41EF1808EF for ; Wed, 11 Sep 2019 14:47:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.198 X-Spam-Level: X-Spam-Status: No, score=-0.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id KWV-D4kF7qGs for ; Wed, 11 Sep 2019 14:47:55 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.215.180; helo=mail-pg1-f180.google.com; envelope-from=clebert.suconic@gmail.com; receiver= Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id 80BA8BC681 for ; Wed, 11 Sep 2019 14:47:55 +0000 (UTC) Received: by mail-pg1-f180.google.com with SMTP id d10so11632687pgo.5 for ; Wed, 11 Sep 2019 07:47:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=b/8Bc7/NDZ205LlUm0r0++vAhUywK1DhcrmR6wjLw88=; b=jq4snEJQpKua/UxqCo5L47kqvSaer+JPhCxfb3iLlaM3KW5KSEJJSptMht+nZDc4MR 2/dfghcNNH2oAPBGYT9zyTFboqSmOiotvg4ILXv4KzuYc6ksmiItdi1FCSbwHwsjS/96 246Ep8m75ddQFCvCTcrkew8pHmy3Gl36pVrQSNBKDUSLu97QHVTNHa4ZFlYNPzIZx+pO bdkMx/pmXDdiWqdS1eLiK6ag/gQ1dMh5zJ5zfI0LXe71fFWRKUm3cSaHLyOM56a2EbjP X/Gi5jTqF4pwAaaAURXnkW2AKva/jFbuaksoJ9JjJy5I5GvOSsCp3i1Nwwy2l+nHw9OM zpCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=b/8Bc7/NDZ205LlUm0r0++vAhUywK1DhcrmR6wjLw88=; b=Q1l+QvrmdJD1fLKsY0RLtPrmFv89KwXNb3SIuhDWScGis7dDrjqrjtV15SLDyvaBF2 5hb4XI/+zOxH4Jegkfewl4PomLAV+/qpqA9jFmHJwgua/+mncajNdxNlMt8PEaL3Xxip bZnDLgH7KSZiU9fgMsdjKhyGZSRokY5Ftt8cho9Cjk0J02mY4dN5Vz7Ye+duSxLQgm1b 1gFqOXMqtexypbu7V/g2nEx3HeJgCF3wvvsUducFQ4qaS9CV0D1WL6O2D4h2xa8TdAoF lDr6NN8TvRf53PgX71p72QVHcRsBhPoWNI4pBrdXwTq9QPzSQXSxIVncA79ga4j/MBRA LAHA== X-Gm-Message-State: APjAAAV+TTk+iq3Nhf6LmcE+J0WHdZGdeJ5gTTz42HV89ME+AJhDQ8bZ 7dVawk97ZqA9EfYtW66f2IXg2yUEHc8fRZC5Ov4eW/Ku X-Google-Smtp-Source: APXvYqz/tE48K3GiG6kmBGJqhu1PWCg3+kr/SeIic0/qz0B8a9A2YeMWs6hxMDrHWFy2h4QdkrPDbjhArSa6A7KIJnI= X-Received: by 2002:a17:90a:b286:: with SMTP id c6mr5961433pjr.1.1568213268862; Wed, 11 Sep 2019 07:47:48 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Clebert Suconic Date: Wed, 11 Sep 2019 10:47:37 -0400 Message-ID: Subject: Re: [DISCUSS/REQUEST] AssertNull after receive messages (valid for both ActiveMQ and Artemis) To: dev@activemq.apache.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Right: I don't rule out using receive(timeout) and assertNull for a real te= st... But so far in my 10 years working in messaging, I still haven't seen a case where assertNull(receiveNoWait) wasn't just fine. At least, please avoid it as much as you can On Wed, Sep 11, 2019 at 10:33 AM Robbie Gemmell wrote: > > The Qpid JMS client will round trip to the server on any receive or > receiveNoWait calls where it doesnt have a message available locally > in time (unless it has been configured not to do so). > > On Wed, 11 Sep 2019 at 15:21, Clebert Suconic = wrote: > > > > Even if that's the case.. It would eventually fail. > > > > As far as I know, AMQP client is sending a disposition to the server. > > > > At one point in Artemis we would just catch from the current local cach= e. > > > > It is the user's expectation to perform the roundtrip, even though > > there's nothing specified on the JMS API. > > > > Users would be complaining to qpid-jms if that was the case. > > > > > > There's no reason really to do Assert.assertNull(receive(5000)); > > > > On Wed, Sep 11, 2019 at 9:45 AM Jiri Dan=C4=9Bk wro= te: > > > > > > On Wed, Sep 11, 2019 at 3:40 PM Clebert Suconic > > > wrote: > > > > > > > Instead, please use consumer.receiveNoWait(); > > > > > > > > > > Depending on which JMS client is used (artemis-core-jms, > > > activemq-jms-client, qpid-jms-client), receiveNoWait either does a > > > roundtrip to server to check for new messages, or it does not. This > > > difference can be important for the test. > > > > > > c.f. https://github.com/eclipse-ee4j/jms-api/issues/85 > > > -- > > > Mit freundlichen Gr=C3=BC=C3=9Fen / Kind regards > > > Jiri Dan=C4=9Bk > > > > > > > > -- > > Clebert Suconic --=20 Clebert Suconic