This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle DB errors during fixture load
[#137691589]
- Loading branch information
Konstantin Semenov
committed
Feb 5, 2017
1 parent
815502c
commit a7be34a
Showing
21 changed files
with
226 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
src/main/kotlin/io/pivotal/trilogy/testcase/GenericTrilogyTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
package io.pivotal.trilogy.testcase | ||
|
||
data class GenericTrilogyTest(override val description: String, val body: String, | ||
override val assertions: List<TrilogyAssertion>) : TrilogyTest { | ||
} | ||
override val assertions: List<TrilogyAssertion>) : TrilogyTest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/io/pivotal/trilogy/testrunner/FixtureLoadException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.pivotal.trilogy.testrunner | ||
|
||
class FixtureLoadException(message: String, cause: RuntimeException) : UnrecoverableException(message, cause) |
3 changes: 0 additions & 3 deletions
3
src/main/kotlin/io/pivotal/trilogy/testrunner/InconsistentDatabaseException.kt
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/io/pivotal/trilogy/testrunner/SourceScriptLoadException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.pivotal.trilogy.testrunner | ||
|
||
class SourceScriptLoadException(message: String, cause: RuntimeException) : UnrecoverableException(message, cause) |
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/io/pivotal/trilogy/testrunner/UnrecoverableException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.pivotal.trilogy.testrunner | ||
|
||
open class UnrecoverableException(message: String, cause: RuntimeException) : RuntimeException(message, cause) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/test/resources/projects/broken_fixtures/src/001.validate_balance.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CREATE OR REPLACE PROCEDURE VALIDATE_BALANCE( | ||
V_CLIENT_ID IN NUMBER, | ||
V_IS_VALID OUT NUMBER | ||
) AS | ||
BEGIN | ||
SELECT CASE C.BALANCE - COALESCE(SUM(T.VALUE), 0) WHEN 0 THEN 1 ELSE 0 END INTO V_IS_VALID | ||
FROM CLIENTS C LEFT JOIN TRANSACTIONS T ON T.ID_CLIENT=C.ID WHERE C.ID=V_CLIENT_ID GROUP BY C.ID, C.BALANCE; | ||
END; |
Oops, something went wrong.