Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 102350

Summary: Need Test "Harness" to ensure not too many network requests some from WTP
Product: [WebTools] WTP Releng Reporter: David Williams <david_williams>
Component: relengAssignee: webtools.releng <webtools.releng-inbox>
Status: RESOLVED FIXED QA Contact: Carl Anderson <ccc>
Severity: enhancement    
Priority: P3 CC: peter.liu
Version: unspecifiedKeywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description David Williams CLA 2005-06-30 12:10:55 EDT
Given bugs like bug 88260 and its related "client compliant" in bug 96824 we
should have some instrumented code we could have running that would warn us if
someone in WTP plugins was making too many and too frequent request from the
network. 

As either URL connnections or even socket connections. 
I'm not sure what the right amount is, but seems it be easy to have 
bugs that caused way too many repeated requests way too frequently. 

And ... its hard to test very well, I think. We can always test "central
providers" (like the URL caching mechanism) but we can't know everyone in WTP is
using that, anyone could open a socket or open a URL connection .. and there's a
lot of code in WTP to check by hand :) 
Plus ... as we move forward, we could more easily spot "regressions" where we
might have introducted this behavior by accident.
Comment 1 David Williams CLA 2005-07-02 10:42:28 EDT
FYI ... we should also consider/test scenerio's are "remote" just being on 
a networked machine. (Do we work with UNC yet?). 
I was just reminded of his seeing some reports on other news groups about some
"poor performance" caused by some innocent coding from CDT:

=======================================================================
wharley@bea.com (Walter Harley) wrote in
news:d9p6sl$i6g$1@news.eclipse.org: 
 
> "Bert Hyman" <bert.hyman@unisys.com> wrote in message 
> news:Xns968253140E186VeebleFetzer@206.191.52.34...
>> [...]
>> For each marker I added, the real file on the remote system was
>> opened, the first line of the file was read one.byte.at.a.time and
>> the file was then closed. [...]
>  
> Sounds like the sort of behavior that would happen if something
> were trying to decide whether the file were binary or text?  Maybe
> that's a clue, dunno. 
 
That was it.
 
We had attached the C Nature (org.eclipse.cdt.core.cnature) to our
project so that anybody editing a C program file would get the
benefit of the C outline. 
 
Unfortunately the CDT attaches a resource change listener which looks
at the target file on every resource change event (adding a marker
being one) and reads the first few bytes of the file to see if it's
binary. 
 
So, we're currently weighing the benefit of supplying the C outline
vs. the cost of opening/reading/closing the file on each and every
marker. Or maybe some other way to stop the check on resource
changes. 
 
This does suggest that people doing C development on non-local files
might see some unexpected network traffic. 
 
-- 
Bert Hyman | Unisys - Roseville MN
bert.hyman@unisys.com | (651) 635-7791 | net2: 524-7791

=======================================================================
Comment 2 Chuck Bridgham CLA 2005-08-03 09:40:02 EDT
David, since its your request, we'll let you oversee this one.  Please reassign
to other component lead if appropriate
Comment 3 Peter Liu CLA 2009-05-06 11:58:43 EDT
Hi, David. This bug was opened in 2005. Are you still looking for a test harness? I'm looking for JUnit-related stuff to work on. Thanks.

Peter.
Comment 4 David Williams CLA 2011-09-21 14:56:15 EDT
I was going to close this as "fixed", since there was something half-implemented a long time ago, but I am not positive it is still working in "the builds" ... so, guess that could be a new bug :) 

The overall utility is described in 
http://www.eclipse.org/webtools/development/httptracerutility/index.php

The problem is, it does not report anything, if in fact there is no "outgoing" http request ... but, seems like we should be getting at least a few? But, I'm not sure enough to leave this bug open. In addition, these "test http logs" never were integrated into the "junit summary logs" page. If/when there is an "outgoing http request" from a junit plugin, there should be a log created named httplogstest/outgoinghttplog-${plugin-name}.log  

I still see the httplogstest directory being created, during junit runs, but it is empty. 

Oh, re-reading httptracerutility web page, I see to make it work, the httphandler.jar must be in the JRE's ext/lib directory. As we've changed JRE versions (couple of times a year) I doubt anyone thought to copy over that jar. 

I'll open new bug. 

(And, greatest apologies Peter Liu, for never responding to your kind offer to help 2 years ago).