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

Updates to fix coercion errors. DSDEEPB-727 #84

Merged
merged 1 commit into from
Jul 8, 2015
Merged

Conversation

kshakir
Copy link
Contributor

@kshakir kshakir commented Jul 8, 2015

Fixed Symbol doubly qualifying the symbol names. (thx mcovarr/scottfrazer)
Added WdlType.fromRawString, with test against respective WdlValue.toRawString.
DummyDataAccess replaced with using DataAccess instances, with cleanup of connections.
When creating in memory databases will create unique DataAccess instances, just like Dummy.
TestSlickDatabase now prints a warning, instead of an error, when unable to connect to MySql.

@kshakir kshakir force-pushed the ks_coercion_errors branch 2 times, most recently from bbcd0cd to e09e881 Compare July 8, 2015 01:11
@@ -39,42 +42,43 @@ class WorkflowManagerActorSpec extends CromwellTestkitSpec("WorkflowManagerActor

val actual = outputs.map { case (k, WdlString(string)) => k -> string }
actual shouldEqual Map(HelloWorld.OutputKey -> HelloWorld.OutputValue)
Await.result(dataAccess.shutdown(), Duration.Inf)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this use a loan pattern for the DataAccess? (Warning: did not test this)

with { dataAccess =>
  doStuff()
}

def with[T](work: DataAccess => T): T = {
  val dataAccess = DataAccess()
  work(dataAccess)
  Await.result(dataAccess.shutdown(), Duration.Inf)
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for loan pattern

aside: Beyond thinking this talk from Dick Wall is worthwhile he does have an amusing anecdote about bioinformaticists abusing the loan pattern (just after 13:00 if you want to skip the rest)

@kshakir kshakir force-pushed the ks_coercion_errors branch from e09e881 to d062d8c Compare July 8, 2015 04:31
@kshakir
Copy link
Contributor Author

kshakir commented Jul 8, 2015

Ready for next round of review. Also, please let me know if I didn't address anything from the first round with either a sufficient fix or a comment.

@mcovarr
Copy link
Contributor

mcovarr commented Jul 8, 2015

With the addition of some comments in the spots where there's discussion, looks good to me. 😄

Fixed Symbol doubly qualifying the symbol names. (thx mcovarr/scottfrazer)
Added `WdlType.fromRawString`, with test against respective `WdlValue.toRawString`.
`DummyDataAccess` replaced with using `DataAccess` instances, with cleanup of connections.
When creating in memory databases will create unique `DataAccess` instances, just like Dummy.
TestSlickDatabase now prints a warning, instead of an error, when unable to connect to MySql.
@kshakir kshakir force-pushed the ks_coercion_errors branch from d062d8c to 751385c Compare July 8, 2015 14:18
@geoffjentry
Copy link
Contributor

👍 from me

mcovarr added a commit that referenced this pull request Jul 8, 2015
Updates to fix coercion errors. DSDEEPB-727
@mcovarr mcovarr merged commit 2dbcaa0 into develop Jul 8, 2015
@mcovarr mcovarr deleted the ks_coercion_errors branch July 8, 2015 18:15
mcovarr pushed a commit that referenced this pull request Oct 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants