Skip to content

Instantly share code, notes, and snippets.

@dbalduini
Created May 12, 2014 23:04
Show Gist options
  • Save dbalduini/42a2a4130c946a40efc7 to your computer and use it in GitHub Desktop.
Save dbalduini/42a2a4130c946a40efc7 to your computer and use it in GitHub Desktop.
CleanUp Hook for scala tests
// src/test/scala/
package integration.config
class CleanUpHook {
//DBs.closeAll()
println("CleanUpHook => Connection Closed!")
}
// build.sbt
testOptions in Test += Tests.Cleanup( (loader: java.lang.ClassLoader) => {
loader.loadClass("integration.config.CleanUpHook").newInstance
} )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment