Class TapeLibrarySimulator

java.lang.Object
fr.gouv.vitam.storage.offers.tape.simulator.TapeLibrarySimulator

public class TapeLibrarySimulator extends Object
Helper class for emulating a Tape Library behaviour for integration testing purposes. Handles an in-memory tape library (1 changer, x drives, y slots and z tapes), and provides TapeLoadUnloadService, TapeReadWriteService and TapeDriveCommandService instances that simulates operations on tape library. Concurrent operations on the same changer, drive, slot or tape is prohibited (e.g. trying to load a tape A into a slot that is currently being unloaded...) Any unexpected error (i.e. reading past last file of a tape, loading from an empty slot...) is reported through getFailures() for post test checks
  • Constructor Details

    • TapeLibrarySimulator

      public TapeLibrarySimulator(Path inputDirectory, Path tempOutputStorageDirectory, int nbDrives, int nbSlots, int nbTapes, int maxTapeCapacityInBytes, String cartridgeType, int sleepDelayMillis)
  • Method Details