Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute Procedure Expect Exception fails for procedures with no parameters #490

Open
javornikolov opened this issue Feb 23, 2016 · 11 comments · May be fixed by #624
Open

Execute Procedure Expect Exception fails for procedures with no parameters #490

javornikolov opened this issue Feb 23, 2016 · 11 comments · May be fixed by #624
Labels
Milestone

Comments

@javornikolov
Copy link
Contributor

The problem has been reported on the mailing list. Stack trace of a failing example as following;

!| Execute Procedure Expect Exception| DBFIT_delete_test_proc |
com.microsoft.sqlserver.jdbc.SQLServerException: Hard deletes of the dbo.test_table table prohibited.  Set deletedsw=1 instead.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1515)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:404)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350)
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
    at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(SQLServerPreparedStatement.java:332)
    at dbfit.fixture.StatementExecution.run(StatementExecution.java:24)
    at dbfit.fixture.DbObjectExecutionFixture.doRows(DbObjectExecutionFixture.java:66)
    at fit.Fixture.doTable(Fixture.java:155)
    at fitlibrary.traverse.AlienTraverseHandler.doTable(AlienTraverseHandler.java:18)
    at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:99)
    at fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretWholeTable(DoTraverseInterpreter.java:87)
    at fitlibrary.DoFixture.interpretWholeTable(DoFixture.java:69)
    at fitlibrary.suite.InFlowPageRunner.run(InFlowPageRunner.java:34)
    at fitlibrary.DoFixture.interpretTables(DoFixture.java:42)
    at dbfit.DatabaseTest.interpretTables(DatabaseTest.java:26)
    at fit.Fixture.doTables(Fixture.java:80)
    at fit.FitServer.process(FitServer.java:81)
    at fit.FitServer.run(FitServer.java:56)
    at fit.FitServer.main(FitServer.java:41)

Looks like in DbObjectExecutionFixture.doRows we have separate processing of no-args and with-args cases where the former doesn't properly handle expected exceptions.

@javornikolov javornikolov added this to the Next milestone Oct 16, 2016
@javornikolov javornikolov mentioned this issue Oct 16, 2016
12 tasks
@MMatten
Copy link
Contributor

MMatten commented Oct 26, 2016

@javornikolov I'll pick this one up next.

@javornikolov
Copy link
Contributor Author

Cool 👍 Thank you!

@MMatten
Copy link
Contributor

MMatten commented Nov 6, 2016

After having done some work on this, something occurred to me; should we look to handle the exception of "the actual procedure doesn't actually exist" in a specific way, or just allow this to not report an exception to the test results?

So, this relates mainly to the case of expecting any exception to be raised by the call.

@javornikolov
Copy link
Contributor Author

That's a very good question. I think we don't have a specific test to illustrate what happens in such case.

My intuition is that expecting exception should only pass if the stored proc call succeeded but it has raised an error.

@javornikolov
Copy link
Contributor Author

Anyway - perhaps we should tackle the case with non-existing sp in separate issue.

@MMatten
Copy link
Contributor

MMatten commented Mar 11, 2017

@javornikolov I'll resume work on resolving this next.

@javornikolov
Copy link
Contributor Author

@javornikolov I'll resume work on resolving this next.

Great. When we're done with that I guess we can issue a new release.

@javornikolov
Copy link
Contributor Author

@MMatten is there anything which should be done about this issue?

@MMatten
Copy link
Contributor

MMatten commented Jan 29, 2018

@javornikolov - indeed there should. I can do some work on it towards the end of this week so we can roll it into the next release. It’s been hanging around for a very long time.

@javornikolov
Copy link
Contributor Author

I think we can roll out 4.0.0 without it. And we can have 4.0.1 or 4.1.0 soon after that.

@MMatten
Copy link
Contributor

MMatten commented Jan 30, 2018

OK. That sounds good to me.

@javornikolov javornikolov modified the milestones: 4.0.0, 4.0.1 Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants