You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Brian Eaton (JIRA)" <ji...@apache.org> on 2008/05/09 02:50:55 UTC

[jira] Created: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

shindig handling of HTTP dates is not thread safe
-------------------------------------------------

                 Key: SHINDIG-257
                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
             Project: Shindig
          Issue Type: Bug
            Reporter: Brian Eaton
         Attachments: dateformat.patch

I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Eaton updated SHINDIG-257:
--------------------------------

    Attachment: dateformat.patch

Cassie patched in half of this (serves me right for sending the same change on two different patch files...)  This should apply cleanly.

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595927#action_12595927 ] 

Kevin Brown commented on SHINDIG-257:
-------------------------------------

Did you try cleaning your build? The tests seem to run fine for me. Sometimes stuff easymock generates causes test failures when methods change.

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Eaton updated SHINDIG-257:
--------------------------------

    Attachment: joda.patch

The joda patch again, this time with less cruft and more passing tests.

Found another bug in BasicContentCacheTest, it was using timezones like -0700 instead of GMT.

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch, joda.patch, org.apache.shindig.gadgets.BasicContentCacheTest.txt, TEST-org.apache.shindig.gadgets.BasicContentCacheTest.xml
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Santiago Gala (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Santiago Gala updated SHINDIG-257:
----------------------------------

    Attachment: org.apache.shindig.gadgets.BasicContentCacheTest.txt

java/gadgets/target/surefire-reports/org.apache.shindig.gadgets.BasicContentCacheTest.txt

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch, org.apache.shindig.gadgets.BasicContentCacheTest.txt
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Eaton updated SHINDIG-257:
--------------------------------

    Attachment:     (was: joda.patch)

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch, org.apache.shindig.gadgets.BasicContentCacheTest.txt, TEST-org.apache.shindig.gadgets.BasicContentCacheTest.xml
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596121#action_12596121 ] 

Brian Eaton commented on SHINDIG-257:
-------------------------------------

Prior to my patch AbstractContentCache had the same bug you fixed in BasicContentCacheTest:

       private final static DateFormat dateFormat  = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z");

That's why the tests used to pass for you.

As I was playing around with this I discovered something else interesting: SimpleDateFormat timezones change permanently when you parse a string.  If you call parseDate() on a string that claims to be pacific daylight time, followed by formatDate() on a Date object, the formatted date is returned in PDT rather than GMT.

I hate java.util.SimpleDateFormat.  I'm looking at Joda now.

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch, org.apache.shindig.gadgets.BasicContentCacheTest.txt, TEST-org.apache.shindig.gadgets.BasicContentCacheTest.xml
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Santiago Gala (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596091#action_12596091 ] 

Santiago Gala commented on SHINDIG-257:
---------------------------------------

I have a Core 2 Duo machine *and* I have no clue about how maven works.

So, summarizing: it might be, but I don't know.

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch, org.apache.shindig.gadgets.BasicContentCacheTest.txt, TEST-org.apache.shindig.gadgets.BasicContentCacheTest.xml
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Brown closed SHINDIG-257.
-------------------------------

    Resolution: Fixed

Applied. Thanks.

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595662#action_12595662 ] 

Brian Eaton commented on SHINDIG-257:
-------------------------------------

SHINDIG-226 doesn't look thread-safe either, and Kevin Brown had a few comments on it.  Would you be willing to address Kevin's comments and move your code to HttpUtil.java?

About related issue patches vs global patches: in general I agree with you, but I also like to see build warnings get cleaned up.  It's one thing to send in a giant patch for several unrelated issues, but adding a few small bits of code cleanup seems within reason.  (I defer to the shindig team on which they prefer, of course...)

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Santiago Gala (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595994#action_12595994 ] 

Santiago Gala commented on SHINDIG-257:
---------------------------------------

When I create a branch in the previous changeset (which works) and then cherry pick all subsequent commits except for the one in this patch, all tests pass with head, which looks quite suspicious again for me.

Using a clean working copy on the changeset r654993:
Results of mvn clean; mvn

(...)
Failed tests: 
  testCacheableForFutureExpires(org.apache.shindig.gadgets.BasicContentCacheTest)
  testCacheableForExpiresWithWait(org.apache.shindig.gadgets.BasicContentCacheTest)

Tests run: 252, Failures: 2, Errors: 0, Skipped: 0

I attach the file relevant to the failed tests.

> I don't trust mvn clean very much.
I really need to wonder why are we using a tool that can't even be trusted to 
a) give reports that people can understand
b) clean the workspace
(but then I'm really queer, as all the java world seems to be happy using it)

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch, org.apache.shindig.gadgets.BasicContentCacheTest.txt
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Eaton updated SHINDIG-257:
--------------------------------

    Attachment: joda.patch

Use Joda instead of java.text.SimpleDateFormat, because SimpleDateFormat has more quirks than a deranged monkey.

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch, joda.patch, org.apache.shindig.gadgets.BasicContentCacheTest.txt, TEST-org.apache.shindig.gadgets.BasicContentCacheTest.xml
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Santiago Gala (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595929#action_12595929 ] 

Santiago Gala commented on SHINDIG-257:
---------------------------------------

"mvn clean; mvn" was the command I used for the bisect. I hope this is enough and maven does not require even funnier cleanups :P

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Santiago Gala (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596094#action_12596094 ] 

Santiago Gala commented on SHINDIG-257:
---------------------------------------

r655528 fixe it.

The problem was that the tests were *not* using Locale.US (which was a bug in itself), and your change made it stop ignoring an exception somewhere. (guess)

I'm not sure that just making the Expires header "legal" is the only fix needed, I guess your patch might have some problem not previously there with "illegal" Expires.

Assessment?

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch, org.apache.shindig.gadgets.BasicContentCacheTest.txt, TEST-org.apache.shindig.gadgets.BasicContentCacheTest.xml
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Louis Ryan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595452#action_12595452 ] 

Louis Ryan commented on SHINDIG-257:
------------------------------------

SimpleDateFormat is notoriously expensive to contruct, we should probably use a ThreadLocal factory. 

E.g.

   private final static ThreadLocal<SimpleDateFormat> httpDateFormat =  
         new ThreadLocal<SimpleDateFormat>() {  
                protected SimpleDateFormat initialValue() {  
                     return new SimpleDateFormat(HTTP_DATE_HEADER_FORMAT, Locale.US);  
                 }  
         };  

the just use 

httpDateFormat.get() ....

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Eaton updated SHINDIG-257:
--------------------------------

    Attachment: dateformat.patch

This also includes some build warning fixes.

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595948#action_12595948 ] 

Brian Eaton commented on SHINDIG-257:
-------------------------------------

The tests pass for me.  Can someone check java/gadgets/target/surefire-reports/ for log files that indicate why those tests failed?

Actually, before you do that try clobbering your local shindig sandbox and running svn update, then running the tests again.  I don't trust mvn clean very much.

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Eaton updated SHINDIG-257:
--------------------------------

    Attachment: dateformat.patch

Updated to use a thread local date formatter.

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Eaton updated SHINDIG-257:
--------------------------------

    Attachment:     (was: dateformat.patch)

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Santiago Gala (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595925#action_12595925 ] 

Santiago Gala commented on SHINDIG-257:
---------------------------------------

On my machine two tests fail after this changeset, and do not before:

mvn -e
(...)

Results :

Failed tests: 
  testCacheableForFutureExpires(org.apache.shindig.gadgets.BasicContentCacheTest)
  testCacheableForExpiresWithWait(org.apache.shindig.gadgets.BasicContentCacheTest)

Tests in error: 
  testNoSignedPreloadWithoutToken(org.apache.shindig.gadgets.GadgetServerTest)
  testSignedPreloadWithToken(org.apache.shindig.gadgets.GadgetServerTest)

Tests run: 346, Failures: 2, Errors: 2, Skipped: 0

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.BuildFailureException: There are test failures.
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:579)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
	at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:425)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
	... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Sun May 11 16:35:50 CEST 2008
[INFO] Final Memory: 25M/196M
[INFO] ------------------------------------------------------------------------


> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Santiago Gala (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596092#action_12596092 ] 

Santiago Gala commented on SHINDIG-257:
---------------------------------------

Sorry, I summitted the comment before it was ready.

It looks too consistent (as in *always* fails after this revision and *never* fails before) to be a parallel/threading issue. I would expect more randomness in failure.

Also, about the time taken to run the tests, they seem to be fast. I have no clue how to get more precise than this. Also, they seem to take the same time wether they succeed or not.

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch, org.apache.shindig.gadgets.BasicContentCacheTest.txt, TEST-org.apache.shindig.gadgets.BasicContentCacheTest.xml
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Santiago Gala (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Santiago Gala updated SHINDIG-257:
----------------------------------

    Attachment: TEST-org.apache.shindig.gadgets.BasicContentCacheTest.xml

java/gadgets/target/surefire-reports/TEST-org.apache.shindig.gadgets.BasicContentCacheTest.xml

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch, org.apache.shindig.gadgets.BasicContentCacheTest.txt, TEST-org.apache.shindig.gadgets.BasicContentCacheTest.xml
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Eaton updated SHINDIG-257:
--------------------------------

    Attachment:     (was: dateformat.patch)

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Kevin Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595753#action_12595753 ] 

Kevin Brown commented on SHINDIG-257:
-------------------------------------

This patch doesn't seem to apply cleanly against HEAD. Louis has suggested moving to joda time. I think that makes more sense than some of the more convoluted stuff here.

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-257) shindig handling of HTTP dates is not thread safe

Posted by "Brian Eaton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596086#action_12596086 ] 

Brian Eaton commented on SHINDIG-257:
-------------------------------------

Two questions.

- is it at all possible that your machines are running those tests in parallel?  (Because they aren't thread-safe either...)
- how long does it take your machines to run those tests?

> shindig handling of HTTP dates is not thread safe
> -------------------------------------------------
>
>                 Key: SHINDIG-257
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-257
>             Project: Shindig
>          Issue Type: Bug
>            Reporter: Brian Eaton
>         Attachments: dateformat.patch, org.apache.shindig.gadgets.BasicContentCacheTest.txt, TEST-org.apache.shindig.gadgets.BasicContentCacheTest.xml
>
>
> I noticed this during a bit of load testing, spurious exceptions from SimpleDateFormat because it isn't thread safe.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.