Skip to content

Commit

Permalink
Ran all tests. Prepping for snapshot release :)
Browse files Browse the repository at this point in the history
  • Loading branch information
SubiyaCryolite committed Oct 18, 2017
1 parent 8b98737 commit 42f68be
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
8 changes: 4 additions & 4 deletions src/test/java/tests/LoadAndSaveTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class LoadAndSaveTests : BaseTestConfig() {
val thread = Thread(saving)
thread.start()
while (!saving.isDone)
println("Waiting for operation 1 to complete")
Thread.sleep(16)
System.out.printf("Saved? %s\n", saving.get())
}

Expand All @@ -42,11 +42,11 @@ class LoadAndSaveTests : BaseTestConfig() {
Thread(loadingSortedInstances).start()

while (!loadingAllInstances.isDone)
println("Waiting for operation 1 to complete")
Thread.sleep(16)
while (!loadingSpecificInstance.isDone)
println("Waiting for operation 2 to complete")
Thread.sleep(16)
while (!loadingSortedInstances.isDone)
println("Waiting for operation 3 to complete")
Thread.sleep(16)

val allInstances = loadingAllInstances.get()
val specificInstance = loadingSpecificInstance.get()
Expand Down
4 changes: 1 addition & 3 deletions src/test/java/tests/TimeConstructs.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package tests

import common.BaseTestConfig
import entities.Address
import entities.TimeConstruct
import io.github.subiyacryolite.jds.JdsLoad
import io.github.subiyacryolite.jds.JdsSave
import org.junit.jupiter.api.Test
import java.time.*
import java.util.*

class TimeConstructs : BaseTestConfig() {
Expand Down Expand Up @@ -55,7 +53,7 @@ class TimeConstructs : BaseTestConfig() {
@Test
@Throws(Exception::class)
fun testOracle() {
initialiseSqlLiteBackend()
initialiseOracleBackend()
saveAndLoad()
}

Expand Down
22 changes: 9 additions & 13 deletions src/test/java/tests/Views.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import java.sql.SQLException
*/
class Views : BaseTestConfig() {


@Test
@Throws(SQLException::class, ClassNotFoundException::class)
fun allImplementation() {
Expand All @@ -24,39 +23,36 @@ class Views : BaseTestConfig() {
@Throws(SQLException::class, ClassNotFoundException::class)
fun oracleImplementation() {
initialiseOracleBackend()
for (entry in jdsDb.mappedClasses) {
val delete = JdsView.delete(entry, jdsDb)
val create = JdsView.create(entry, jdsDb)
}
dropAndRecreateViews()
}

@Test
@Throws(SQLException::class, ClassNotFoundException::class)
fun tSqlImplementation() {
initialiseTSqlBackend()
for (entry in jdsDb.mappedClasses) {
val delete = JdsView.delete(entry, jdsDb)
val create = JdsView.create(entry, jdsDb)
}
dropAndRecreateViews()
}

@Test
@Throws(SQLException::class, ClassNotFoundException::class)
fun postgresImplementation() {
initialisePostgeSqlBackend()
for (entry in jdsDb.mappedClasses) {
val delete = JdsView.delete(entry, jdsDb)
val create = JdsView.create(entry, jdsDb)
}
dropAndRecreateViews()
}

@Test
@Throws(SQLException::class, ClassNotFoundException::class)
fun mysqlImplementation() {
initialiseMysqlBackend()
dropAndRecreateViews()
}

@Throws(SQLException::class, ClassNotFoundException::class)
private fun dropAndRecreateViews() {
for (entry in jdsDb.mappedClasses) {
val delete = JdsView.delete(entry, jdsDb)
val create = JdsView.create(entry, jdsDb)
}
println("Created views :)")
}
}

0 comments on commit 42f68be

Please sign in to comment.