Executing jQuery.noConflict() mandatory when using jQuery in Visualforce

Visualforce pages presently always have the JavaScript library Prototype automatically included. Other platform standard JavaScript such as RichFaces used by apex:tabPanel then rely on this library and the environment it creates such as a global function that has the name “$”.

So what happens when you also want to use jQuery in a Visualforce page? Generally, that is not a problem but only if as well as including jQuery you always execute the function jQuery.noConflict().

You’ll find plenty of posts talking about this, but the piece I didn’t understand is that jQuery caches the current value of “$” when you include it but only puts the cached value back in scope when you execute the jQuery.noConflict() function. So don’t put the jQuery.noConflict() inside conditional logic (or you will find yourself spending a couple of hours in Chrome’s JavaScript Console debugging as I did today).

“AsyncApexTests Limit exceeded” blocker

I’ve just hit this “AsyncApexTests Limit exceeded” error when I try to run tests in an org. Running the tests in a different way reports this:

To protect all customers from excessive usage and Denial of Service attacks, we limit the number of long-running requests that are processed at the same time by an organization. Your request has been denied because this limit has been exceeded by your organization. Please try your request again later.

Googling reveals posts like this. And the limit is documented in Understanding Execution Governors and Limits.

But having to wait 24 hours before I can continue working? FUBAR.