Annotation Type RestoreSystemProperties

  • @Inherited
    public @interface RestoreSystemProperties
    Saves system properties before the annotated feature method (including any setup and cleanup methods) gets run, and restores them afterwards.

    Applying this annotation to a spec class has the same effect as applying it to all its feature methods.

    Note: Temporarily changing the values of system properties is only safe when specs are run in a single thread per JVM. Even though many execution environments do limit themselves to one thread per JVM, keep in mind that Spock cannot enforce this.

    Note: If this extension is applied, then it will use acquire a lock for Resources.SYSTEM_PROPERTIES

    See Also: