Displaying keyword search results 1 - 11
Created by Fang on January 04, 2013 14:35:14 Last update: January 04, 2013 14:35:41
You can use the runOrder parameter to control the test execution order for Maven surefire tests:
<build> <plugins> <plugin> ...Other options are: Option Meaning alphabetical Alphabetical reversealphabetical Reverse Alphabetical random Randomized hourly alphabetical on even hours, reverse alphabetical on odd hours failedfirst Failed first will run tests that failed on previous run first, as well as new tests for this run. balanced Balanced is only relevant with parallel=classes, and will try to optimize the run-order of the tests to make all tests complete at the same time, reducing the overall execution time. filesystem This is the default. I guess this is the order returned by the file system: uncontrolled but deterministic.
Created by Fang on January 04, 2013 14:16:58 Last update: January 04, 2013 14:16:58
Junit does not support specifying execution order of tests until 4.11. The methods were simply invoked in the order returned by the reflection API. So, the tests are executed in a unspecified but deterministic order, i.e., you have no control over the order of execution, but if you repeat the tests, they are run in the same sequence each time. For version 4.11, you can specify the order with the FixMethodOrder annotation:
import org.junit.runners.MethodSorters; imp...From the release notes : Test execution order By design, JUnit does not specify the execution order of test method invocations. Until now, the methods were simply invoked in the order returned by the reflection API. However, using the JVM order is unwise since the Java platform does not specify...
Created by alfa on June 02, 2011 15:26:37 Last update: June 02, 2011 15:26:37
While doing some Java reflection code, I noticed the method Class.isSynthetic() , which the JavaDoc says returns " true if and only if this class is a synthetic class as defined by the Java Language Specification". However, there's no definition of "synthetic class" in the JLS ! The only thing that I can find that remotely resembles a definition is in the JVM spec , where it defines the synthetic attribute : "The Synthetic attribute is a fixed-length attribute in the attributes table of ClassFile (§4.1), field_info (§4.5), and method_info (§4.6) structures. A class member that does not appear in the source code must be marked using a Synthetic attribute." By this definition, a default constructor, which does not appear in the source code, should...
Created by Dr. Xi on March 30, 2011 21:07:40 Last update: March 31, 2011 11:35:48
To use an alternative keystore for Java, set the system property javax.net.ssl.trustStore to the alternative keystore:
java -Djavax.net.ssl.trustStore=./testKeystore.jks...Even though the default keystore for keytool is $HOME/.keystore , it is not the default keystore used when you run a Java program. To use your keytool default keystore, you have to use -Djavax.net.ssl.trustStore=$HOME/.keystore .
Created by voodoo on February 25, 2011 14:00:41 Last update: February 25, 2011 14:03:46
Suddenly my Windows XP failed to boot with this error message on a blank screen:
missing or corrupt <windows root>\system32\hal.dllI took out the hard drive, put it in a USB enclosure and attached it to another PC. Then I ran CHKDSK and it fixed some file system errors. But I did find that hal.dll was intact, so hal.dll was not missing or corrupt . It turned out that the file that was really missing was C:\boot.ini . It is a hidden file, so you have to use attrib boot.ini to see it. The file is missing if attrib boot.ini returns nothing (run in the root folder C:\). In my case I reconstructed the boot.ini file:
[boot loader] timeout=30 default=multi(0)dis...and changed the attributes back...
Created by nogeek on September 01, 2010 19:25:09 Last update: December 31, 2010 11:54:45
Edit the file server\default\conf\jboss-log4j.xml and change the log level from INFO to DEBUG :
<!-- ============================== --> <!-...Presumably this should change the log level for the console appender (STDOUT) to DEBUG. However, this change alone does not work. It should be used in combination with the system property jboss.server.log.threshold . Either add -Djboss.server.log.threshold=DEBUG to JAVA_OPTS in bin\run.conf.bat :
rem # JVM memory allocation pool parameters - modi...or set it from the command line:
Created by Fang on July 17, 2010 03:16:53 Last update: July 17, 2010 03:18:25
This error happens when the ordering of elements in web.xml is not correct. For example, in a <servlet> declaration, <servlet-name> should come before <servlet-class> . If you switch the order of <servlet-name> and <servlet-class> , you'll get this error. This was my stack trace in JBoss when I declared <load-on-startup> before <init-param> for a servlet:
DEPLOYMENTS IN ERROR: Deployment "vfszip:/C:/...
Created by Dr. Xi on September 29, 2008 23:21:38 Last update: January 16, 2010 23:36:05
Create a startup script for inetd Copy /etc/init.d/skeleton to /etc/init.d/inetd . Change the top section of the script to read:
PATH=/usr/sbin:/usr/bin:/sbin:/bin DESC="In...Now inetd can be stopped/started/restarted like this:
sudo /etc/init.d/inetd stop sudo /etc/init....Add links to rc*.d
$ sudo update-rc.d inetd defaults Adding sy...If you no longer need to start inetd at boot up:
$ sudo update-rc.d -f inetd remove update-r...This would remove the links from the start up sequence but leave /etc/init.d/inetd in place. Contents of /etc/init.d/skeleton :
#! /bin/sh ### BEGIN INIT INFO # Provide...
Created by Bambi on August 07, 2009 03:47:56 Last update: August 07, 2009 03:59:15
package hello.world; // package declaration, must ...Compile/Run:
C:\tmp>javac hello\world\HelloWorld.java C:\tmp...Since the class is not public (package access), the name of the Java file could be anything! If a package access class has a public static void main(String) method, it may still be run from the command line using the class name.
C:\tmp>copy hello\world\HelloWorld.java hello\worl...
Created by Dr. Xi on July 29, 2009 20:58:51 Last update: July 29, 2009 20:58:51
UPDATE events set JSCODE = 'var a = 1; var ...
Created by Dr. Xi on December 12, 2007 21:53:19 Last update: December 12, 2007 21:53:19
The first time you access an SSH host, you'll get and store the host key. Putty stores the host key in the registry. If you run putty plink as a Windows service, the host key should be available to the Windows system user. Otherwise, plink won't connect to the remote server. The solution is to obtain the host key from an interactive session then save it for use for the system user. Here are the steps: 1. Access the remote host interactively with putty or plink. Accept the host key. 2. Run regedit and export the key HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys . You'll get something like this:
Windows Registry Editor Version 5.00 [HKEY_...3. Edit the exported registry file, change HKEY_CURRENT_USER to HKEY_USERS\.DEFAULT :
[HKEY_USERS\.DEFAULT\Software\SimonTatham\PuTTY\Ss...4. Import the...