Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #38619

Re: How to send files without blocking execution finish

Path csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: How to send files without blocking execution finish
Date Thu, 27 Sep 2018 14:01:50 +0200
Organization A noiseless patient Spider
Lines 21
Message-ID <poigrk$pqq$1@dont-email.me> (permalink)
References <cd48f7c3-babb-4b65-bcd3-cce11b2ae5b2@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
Injection-Date Thu, 27 Sep 2018 12:01:56 -0000 (UTC)
Injection-Info reader02.eternal-september.org; posting-host="2ddd4b6bd1ab4898ace1dedb2d7a74af"; logging-data="26458"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/W9IpP45hHCbUIiSYbCE7/"
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
Cancel-Lock sha1:fHyhBGlWdQiIGXUhqBpetcilb6g=
In-Reply-To <cd48f7c3-babb-4b65-bcd3-cce11b2ae5b2@googlegroups.com>
X-Antivirus-Status Clean
Content-Language en-GB
X-Antivirus AVG (VPS 180927-0, 09/27/2018), Outbound message
Xref csiph.com comp.lang.java.programmer:38619

Show key headers only | View raw


On 2018-09-27 11:00, mike wrote:
> Hi,
> 
> We are creating a number of json files in our 'java test application'.
> 
> Problem we have is that at the end of the execution we need to send all these json files to a different servers. This means the java application needs continue running until all files have been sent. This is really not part of the test and only make it look like the tests are still running ( or more holding up valuable execution time).
> 
> Is there a way to start another jvm, from 'java test application' that runs a class that collects the json files and sends them to servers. If possible what will happen to new jvm if old 'java test application' finish execution?
> 
> Or are there any other solutions to the problem?

If uploading those files is really not part of the test, then the test
program shouldn't do it.

To achieve that, I'd suggest abstracting out the component that does the
upload, and inject it with a mock in the test configuration. This
depends on what testing framework and DI you're using, if at all.

-- 
DF.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

How to send files without blocking execution finish mike <mikaelpetterson@hotmail.com> - 2018-09-27 02:00 -0700
  Re: How to send files without blocking execution finish Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-09-27 07:16 -0400
    Re: How to send files without blocking execution finish Martin Gregorie <martin@mydomain.invalid> - 2018-09-27 11:40 +0000
  Re: How to send files without blocking execution finish Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2018-09-27 14:01 +0200

csiph-web