org.apache.log4j.rolling
Class SizeBasedRollingTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.log4j.rolling.SizeBasedRollingTest
All Implemented Interfaces:
junit.framework.Test

public class SizeBasedRollingTest
extends junit.framework.TestCase

Do not forget to call activateOptions when configuring programatically.

Author:
Ceki Gülcü

Constructor Summary
SizeBasedRollingTest(java.lang.String name)
           
 
Method Summary
 void setUp()
           
 void tearDown()
           
 void test1()
          Tests that the lack of an explicit active file will use the low index as the active file.
 void test2()
          Test basic rolling functionality with explicit setting of FileAppender.file.
 void test3()
          Same as testBasic but also with GZ compression.
 void test4()
          Test basic rolling functionality with bogus path in file name pattern.
 void test5()
          Checking handling of rename failures due to other access to the indexed files.
 void test6()
          Deprecated. Tests deprecated method
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 

Constructor Detail

SizeBasedRollingTest

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

setUp

public void setUp()
Overrides:
setUp in class junit.framework.TestCase

tearDown

public void tearDown()
Overrides:
tearDown in class junit.framework.TestCase

test1

public void test1()
           throws java.lang.Exception
Tests that the lack of an explicit active file will use the low index as the active file.

Throws:
java.lang.Exception

test2

public void test2()
           throws java.lang.Exception
Test basic rolling functionality with explicit setting of FileAppender.file.

Throws:
java.lang.Exception

test3

public void test3()
           throws java.lang.Exception
Same as testBasic but also with GZ compression.

Throws:
java.lang.Exception

test4

public void test4()
           throws java.lang.Exception
Test basic rolling functionality with bogus path in file name pattern.

Throws:
java.lang.Exception

test5

public void test5()
           throws java.lang.Exception
Checking handling of rename failures due to other access to the indexed files.

Throws:
java.lang.Exception

test6

public void test6()
           throws java.lang.Exception
Deprecated. Tests deprecated method

Test basic rolling functionality with explicit setting of obsolete FixedWindowRollingPolicy.activeFileName.

Throws:
java.lang.Exception


Copyright © 2010 The Apache Software Foundation. Licensed under the Apache License, Version 2.0

Apache Extras Companion for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.