org.apache.derbyTesting.unitTests.junit
Class AssertFailureTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.derbyTesting.junit.BaseTestCase
              extended by org.apache.derbyTesting.unitTests.junit.AssertFailureTest
All Implemented Interfaces:
junit.framework.Test

public class AssertFailureTest
extends BaseTestCase

Testcase that test that AssertFailure's message string is correct when we have permisssion to do thread dumps and when we don't. Depends on the policyfiles AssertFailureTest.policy and AssertFailureTest1.policy where only the former grants this permission.


Field Summary
private static java.lang.String NO_DUMP_POLICY_FILENAME
          Security policy file that DOESN'T allow thread dumps.
private static java.lang.String POLICY_FILENAME
          Security policy file that allows thread dumps.
 
Fields inherited from class org.apache.derbyTesting.junit.BaseTestCase
DEFAULT_DB_DIR, DERBY_LOG, ERRORSTACKTRACEFILE
 
Constructor Summary
AssertFailureTest(java.lang.String name)
           
 
Method Summary
static junit.framework.Test suite()
           
 void testAssertFailureNoThreadDump()
          Test that AssertFailure's log entry is correct when we DON'T have permisssion to to thread dumps.
 void testAssertFailureThreadDump()
          Test that AssertFailure's message string is correct when we have permisssion to do thread dumps.
 
Methods inherited from class org.apache.derbyTesting.junit.BaseTestCase
alarm, assertEquals, assertEquals, assertEquals, assertExecJavaCmdAsExpected, assertSecurityManager, assertThrowableEquals, execJavaCmd, fail, getFailureFolder, getJavaExecutableName, getSystemProperty, getTestConfiguration, getTestResource, openTestResource, println, printStackTrace, readProcessOutput, removeDirectory, removeDirectory, removeSystemProperty, runBare, setSystemProperty, traceit
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

POLICY_FILENAME

private static java.lang.String POLICY_FILENAME
Security policy file that allows thread dumps.


NO_DUMP_POLICY_FILENAME

private static java.lang.String NO_DUMP_POLICY_FILENAME
Security policy file that DOESN'T allow thread dumps.

Constructor Detail

AssertFailureTest

public AssertFailureTest(java.lang.String name)
Method Detail

suite

public static junit.framework.Test suite()

testAssertFailureThreadDump

public void testAssertFailureThreadDump()
Test that AssertFailure's message string is correct when we have permisssion to do thread dumps. Must be run with correct permissions, ie. with java.lang.RuntimePermission "getStackTrace" and java.lang.RuntimePermission "modifyThreadGroup".


testAssertFailureNoThreadDump

public void testAssertFailureNoThreadDump()
Test that AssertFailure's log entry is correct when we DON'T have permisssion to to thread dumps. Must be run with correct permissions, ie. WITHOUT java.lang.RuntimePermission "getStackTrace" and java.lang.RuntimePermission "modifyThreadGroup";


Built on Sat 2009-11-28 18:44:18-0800, from revision 885187

Apache Derby V10.6 Internals - Copyright © 2004,2008 The Apache Software Foundation. All Rights Reserved.