[RFC][icedtea-web]: Reproducer for DownloadService

Saad Mohammad smohammad at redhat.com
Thu Oct 11 13:30:28 PDT 2012


On 10/01/2012 04:41 PM, Adam Domurad wrote:
> There's a few general concerns here (Mostly a result of this being hard to test):
> 
> 1. this generally looks like a unit test
> 	- As discussed on IRC, this is probably OK considering that its quite difficult to unit test DownloadService in isolation.
> 
> 2. checking for 'true' or 'false' is a bit brittle, it'd be better if you could print all the cached resources and having the test check
> 	- Also discussed on IRC, this would be difficult to do with the given API for handling cached resources
> 
> 3. its all one interdependent test, ran as one process. I think a
> slightly better approach would be to take an argument to
> DownloadServiceRunner that determines the test run type, and run the
> minimal commands needed to test that component. For example,
> loadExternalResource could be tested in isolation from loadPart. 

Hi Adam,

Thanks for the review. Updated patch is attached.

As we discussed on IRC, satisfying #1 & #2 would be very difficult at the
moment. However, I did make some changes for #3.

What's new?
       * Runs three different instances of DownloadServiceRunner to avoid
         dependency of one process to output results. Checking cache, managing
         jnlp resources, and managing external jnlps are verified by the stdout
         of the three instances.
       * Added two test which checks repeated calls of unloading and loading
         a single resource

========================================================================
CHANGELOG
========================================================================
2012-10-11  Saad Mohammad  <smohammad at redhat.com>

	Added reproducer for DownloadService.
	* tests/reproducers/signed/DownloadService/resources/DownloadService.jnlp:
	Launching jnlp file that contains extension jnlp and jars marked with part names.
	* tests/reproducers/signed/DownloadService/resources/DownloadServiceExtension.jnlp:
	DownloadService extension jnlp file with jars marked with part names.
	* tests/reproducers/signed/DownloadService/srcs/DownloadServiceRunner.java:
	A simple class that uses DownloadService to complete tasks and outputs the results.
	* tests/reproducers/signed/DownloadService/testcases/DownloadServiceTest.java:
	Testcase for DownloadService.


-- 
Cheers,
Saad Mohammad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Changelog0-1.patch
Type: text/x-patch
Size: 900 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121011/fd7c2902/Changelog0-1.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reproducers_ds1-0.patch
Type: text/x-patch
Size: 40595 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20121011/fd7c2902/reproducers_ds1-0.patch 


More information about the distro-pkg-dev mailing list