Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Should use JUnit 4 syntax
  • File name ends with *IntegrationTest
  • Should use Category annotation of type IntegrationTestbe part of the integrationTest source set folder (<geode-module-dir>/integrationTest/java)
  • May take longer than a UnitTest but should generally complete in seconds
  • May test a single class or any combination of classes including end-to-end testing of Geode
  • Typically uses black-box testing but may include some white-box testing and helps guarantee external quality (feature delivers value to User)
  • An IntegrationTest may do any of the following:
    • communicate across the network
    • access the file system
    • require anything special in the environment (such as editing config files or running an external process)

...

Code Block
package org.apache.geode.internal.cache.backup;
 
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.awaitility.Awaitility.await;
 
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.contrib.java.lang.system.RestoreSystemProperties;
import org.junit.experimental.categories.Category;
import org.junit.rules.TemporaryFolder;

import org.apache.geode.test.junit.categories.IntegrationTest;
 
@Category(IntegrationTest.class)
public class BackupIncrementalWithMissingBaselineRegressionTest {
  
  @Rule
  public RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
  
  @Rule
  public TemporaryFolder temporaryFolder = new TemporaryFolder();
 
  @Before
  public void setUp() {
    // arrange: create the SUT (system under test) and its dependencies
    // use JUnit 4 TemporaryFolder for any file system use
  }
 
  @Test
  public void incrementalBackupWithMissingBaselineThrows() {
    // act: attempt incremental backup with missing baseline directory
    // assert: verify thrown exception is not NullPointerException with correct message
  }
}

...