I've released the first public version of yui-runner, a small framework for automating the running of YUI javascript unit tests and reporting of their results.
See https://github.com/lacostej/yui-runner
As the main goal is to be able to run your tests from anywhere, the integration is done thanks to a JUnit runner. This means your tests will run in maven thanks to surefire or in your favorite editor.
An example project can be found under https://github.com/lacostej/yui-runner/tree/master/yui-runner-it/src/test/resources.
The project will soon be available on ibiblio, something I'll blog about.
Note: the API for yui-runner is going to change for more flexibility in selecting the URLs to load.
Showing posts with label java. Show all posts
Showing posts with label java. Show all posts
Wednesday, January 5, 2011
Sunday, December 12, 2010
Intellij issues on Ubuntu 64 bits with encrypted /home
Kept running into strange index issues with my Intellij 9 and 10 installations. The system/log/idea.log file was filled with:
or
I seem to have fixed the issue by moving the IDEA config and caches into a non encrypted partition.
See also http://devnet.jetbrains.net/docs/DOC-181 and http://devnet.jetbrains.net/message/5259840.
java.lang.RuntimeException: java.lang.IllegalArgumentException: can't position buffer to offset 43716
at com.intellij.util.io.PersistentEnumerator.valueOf(PersistentEnumerator.java:499)
at com.intellij.util.io.StringRef.getString(StringRef.java:48)
at com.intellij.util.io.StringRef.toString(StringRef.java:92)
[..]
Caused by: java.lang.IllegalArgumentException: can't position buffer to offset 43716
at com.intellij.util.io.PagedFileStorage.get(PagedFileStorage.java:181)
at com.intellij.util.io.PagedFileStorage.getInt(PagedFileStorage.java:127)
at com.intellij.util.io.ResizeableMappedFile.getInt(ResizeableMappedFile.java:141)
[..]
or
java.lang.IndexOutOfBoundsException: off=1006632960 key.owner.length()=17582
at com.intellij.util.io.PagedFileStorage$StorageLock$BuffersCache.createValue(PagedFileStorage.java:66)
at com.intellij.util.io.PagedFileStorage$MyCache.get(PagedFileStorage.java:329)
at com.intellij.util.io.PagedFileStorage.getBuffer(PagedFileStorage.java:280)
at com.intellij.util.io.PagedFileStorage.get(PagedFileStorage.java:176)
at com.intellij.util.io.PagedFileStorage.getInt(PagedFileStorage.java:127)
at com.intellij.util.io.ResizeableMappedFile.getInt(ResizeableMappedFile.java:141)
at com.intellij.util.io.PersistentEnumerator.hashCodeOf(PersistentEnumerator.java:479)
at com.intellij.util.io.PersistentEnumerator.enumerateImpl(PersistentEnumerator.java:328)
at com.intellij.util.io.PersistentEnumerator.enumerate(PersistentEnumerator.java:222)
I seem to have fixed the issue by moving the IDEA config and caches into a non encrypted partition.
$ diff -u /usr/local/lib/idea/bin/idea.properties.orig /usr/local/lib/idea/bin/idea.properties
--- /usr/local/lib/idea/bin/idea.properties.orig 2010-12-10 15:50:01.916136005 +0100
+++ /usr/local/lib/idea/bin/idea.properties 2010-12-10 15:50:44.096136000 +0100
@@ -10,13 +10,13 @@
# Note for Windows users: please make sure you're using forward slashes. I.e. c:/idea/system
# path to IDEA config folder. Make sure you're using forward slashes
-idea.config.path=${user.home}/.IntelliJIdea10/config
+idea.config.path=/usr/local/${user.home}/.IntelliJIdea10/config
# path to IDEA system folder. Make sure you're using forward slashes
-idea.system.path=${user.home}/.IntelliJIdea10/system
+idea.system.path=/usr/local/${user.home}/.IntelliJIdea10/system
# path to user installed plugins folder. Make sure you're using forward slashes
-idea.plugins.path=${user.home}/.IntelliJIdea10/config/plugins
+idea.plugins.path=/usr/local/${user.home}/.IntelliJIdea10/config/plugins
#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDEA should provide code assistance for.
See also http://devnet.jetbrains.net/docs/DOC-181 and http://devnet.jetbrains.net/message/5259840.
Wednesday, September 15, 2010
The sad state of Java decompilers
There are no good complete Java decompilers it seems. And this is sad.
Wednesday, November 25, 2009
Efficiency of a one time debugging session.
Value stream mapping of a debugging session of a fast moving open source project.
Total time: 48 min 15 sec
Time effectively spent on the issue: 2 min 15 sec
Efficiency: 4.66%
YMMV. Done on an almost 3 years old laptop running Ubuntu (1.83GHz Dual core, 2G RAM, 320G disk).
(those timings are from memory, but they seem consistent with the time I used between my mails.
Potential conclusions:
There was a time when firing IDEA was a joy. Is my machine too old ? Did I lose something?
- svn update: 3 min
- mvn install (downloads the world) [FAILURE]: 3 min
- mvn clean install (downloads the world) [FAILURE]: 3 min
- manualy clean the workspace (remove deleted files): 1 min
- mvn install (finishes downloading the world): 5 min
- mvn -DdownloadSources=true idea:idea (downloads the world II, the source return): 10 min
- start idea: 3 min
- open project inside idea: 5 min
- configure a newer JDK in idea: 3 min
- start the program in debugging mode: 30 sec
- add a breakpoint: 15 sec
- reproduce the problem: 15 sec
- find the bug: 15 sec
- mail the user: 1 min
Total time: 48 min 15 sec
Time effectively spent on the issue: 2 min 15 sec
Efficiency: 4.66%
YMMV. Done on an almost 3 years old laptop running Ubuntu (1.83GHz Dual core, 2G RAM, 320G disk).
(those timings are from memory, but they seem consistent with the time I used between my mails.
Potential conclusions:
- don't do random development on semi-complex open source projects ?
- use less complex toolkits/development environments. I usually just read the code in less, nano or gedit. Hint: if someone gives me a simple editor that allows me to navigate between classes, that fires up very quickly, by just reading a maven pom, that would be pretty cool. If that editor had a terminal, even better. Maybe it is time for me to revisit emacs and its ecb...
There was a time when firing IDEA was a joy. Is my machine too old ? Did I lose something?
ssh/sftp in java
Some years ago, we had to deal with SFTP file transfers. We solved the problem by reusing the Apache licensed projects Commons VFS and the org.apache.commons.vfs.provider.sftp.SftpFileProvider class. This reuses the jsch library, and after having to troubleshoot some issues wrt threads and strange disconnections, it left a sour taste in my mouth. (jsch code isn't really my taste, and there's little logging for example, even though the author praises openssh's -v arguments. I don't want to diminish the author's accomplishments, but debugging production server issues with a debugger isn't fun).
I've found the Trilead project, but this project is unsupported now. Latest code is available e.g. from here.
Then another blog entry (also rambling on the code quality of the jsch project...) led me to commons-net-ssh, which sounds like a compelling alternative for SFTP file transfers.
Apache licensed, it looks active, somewhat documented and with a couple of unit tests...
The README says "GSOC project "SSH and SCP for Apache Commons-Net"", and this blog entry hints that the project should be retrofitted one day into apache commons-net. Can't wait for that.
I've found the Trilead project, but this project is unsupported now. Latest code is available e.g. from here.
Then another blog entry (also rambling on the code quality of the jsch project...) led me to commons-net-ssh, which sounds like a compelling alternative for SFTP file transfers.
Apache licensed, it looks active, somewhat documented and with a couple of unit tests...
The README says "GSOC project "SSH and SCP for Apache Commons-Net"", and this blog entry hints that the project should be retrofitted one day into apache commons-net. Can't wait for that.
Subscribe to:
Posts (Atom)