Package org.gbif.dwc

Class ParallelOpeningTest

java.lang.Object
org.gbif.dwc.ParallelOpeningTest

public class ParallelOpeningTest extends Object
This test checks we don't get a race condition between two processes opening the same DWC-A at the same time. It needs to be run from the command line, in parallel. mvn exec:java -Dexec.mainClass=org.gbif.dwc.ParallelOpeningTest Monitor open files with something like: while :; do for i in `pgrep -f ParallelOpeningTest`; do echo $i && ls -l /proc/$i/fd | grep /tmp/par && echo; sleep 1; done; done
  • Constructor Details

  • Method Details

    • testParallelOpening

      public void testParallelOpening() throws Exception
      Check we don't get a race condition when opening an archive which needs sorting. This downloads a large archive (we don't want it in Git) and checks it has at least one extension.
      Throws:
      Exception
    • main

      public static void main(String... args) throws Exception
      Throws:
      Exception