Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jaxrs-dev] [External] : Rx TCK Tests
  • From: Jan Supol <jan.supol@xxxxxxxxxx>
  • Date: Thu, 24 Mar 2022 20:46:25 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kj6szouR99NymbnQh9Jyl1zvcFFBD/XBJlW9fX4yGJ8=; b=T/Z5PpDCxDC+/aPW7yVRaaZukhFtvNFQi+l0RxtK3L9fyCgEddCoEv1Ff5p1dLG4ryfBdcI+cHPvETVQ5Mp1dTgXpZu7wK4MI+VCqLd2tjYn9kE+Kd121eY8tvzutL6btrMX9dKlgmf9N57Juqga92cb9++6my9aZsgOTMwhIwalbXbQiE4b9QQTCaqkc/VaJK0OSbgp2KzocaRvF+rHIhtnjxx6dUhR84/AEORNOfzMvE6rJUL9r1fP3h/Ki/DN+NYWMohJoDxCONbjPUhrbLVf03qYGV2AQsgRReEXKTScyXl87Mr+JeMC2244pD6TbvvQ0MLPTM61CqkbOe1QcA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FPhhpoeQj67gd476xz5av8G3Xr15Uz12aDHWwOXMdUJ+zN3jBrZjrCUsyT4UpdqsOLk4U7tx4/IA2QIT3jyIJZLHFiCfd2nxJ9C87aTqTCyCYL2D3jHqkY41EBJE3rE4GabgGEycDXX/jhgJqoxcNTHaZ3QDKMtRDf+AkzkwBpwUKDhvb/lw2H1ryxxSfo3q1syjrL2MVP95MXKk9Uk3lo09v3uAC+E3M5a94X8l5bMJnupFIZTsHBa/XfBo2brHphGZ/Q0RwFRPMZ7JUBDkBx/RSvgo3Vlx6C3eGGICdFD8JHDFHiTNm/Lh2IuKhzqmHwVqkEJu3WQtkeqD+Dyhkg==
  • Delivered-to: jaxrs-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/jaxrs-dev/>
  • List-help: <mailto:jaxrs-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/jaxrs-dev>, <mailto:jaxrs-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/jaxrs-dev>, <mailto:jaxrs-dev-request@eclipse.org?subject=unsubscribe>
  • Suggested_attachment_session_id: d590847d-aa70-8b97-b65b-2866c23f7cd5
  • Thread-index: AQHYP70rggJ5sF6PGUCuOmeAHk6L/azO/iHE
  • Thread-topic: [External] : [jaxrs-dev] Rx TCK Tests

Hi James,
race condition to me to assume the future is done at this stage

It is doing the opposite.
The test checks that the future is NOT done, yet, i.e. that the rx code is nonblocking, running the HTTP query in a new thread, passing the main thread directly to Future.isDone(). GitHub Actions seems to be doing some funny stuff with threads though. The code might be done better, adding some countdown latch now when the client is run one the same JVM as the server, unlike the EE 8 days.

-- Jan

From: jaxrs-dev <jaxrs-dev-bounces@xxxxxxxxxxx> on behalf of James Perkins <jperkins@xxxxxxxxxx>
Sent: Thursday, March 24, 2022 9:24 PM
To: jaxrs-dev <jaxrs-dev@xxxxxxxxxxx>
Subject: [External] : [jaxrs-dev] Rx TCK Tests
 
Hello All,
I'm curious if anyone has some background on tests like [1]. It creates a CompletionStageRxInvoker, starts a request and converts the CompletationStage to a Future. All that seems fine, except when it gets to [2] where it checks if the future is done. It seems like a bit of a race condition to me to assume the future is done at this stage. While I've seen no issues running this locally or on most CI environments I've run it on, I do see issues on GitHub Actions which is failing several of the tests like this. It's definitely a timing issue because they don't all consistently fail, but it always fails at least one of them because the future is not yet done.

My assumption is the Future.isDone() check is to avoid the possible hang on Future.get(). However, it seems we could easily change that to something like Future.get(configurableTimeout, TimeUnit.SECONDS). Does this seem reasonable? I'm happy to contribute a patch if it seems reasonable.

Just to note too I absolutely do not think this should block any current 3.1 efforts :) The tests have been like this for a long time and for me it's ONLY failing on GitHub Actions.

Thanks in advance!


Back to the top