Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
205d9cc4
Commit
205d9cc4
authored
Apr 04, 2017
by
Peter van 't Hof
Browse files
Fixing unit tests
parent
bcbb2916
Changes
3
Hide whitespace changes
Inline
Side-by-side
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/report/ReportBuilder.scala
View file @
205d9cc4
...
...
@@ -297,7 +297,10 @@ trait ReportBuilder extends ToolCommand {
summary
.
getPipelineName
(
pipelineId
=
pipelineId
).
map
(
_
.
get
->
Future
(
ReportPage
(
Nil
,
Await
.
result
(
Future
.
sequence
(
moduleSectionsSorted
),
Duration
.
Inf
).
toList
,
Map
())))
})
val
pipelineFiles
=
summary
.
getPipelineId
(
runId
,
pipelineName
).
flatMap
(
pipelinelineId
=>
dbFiles
.
map
(
x
=>
x
(
pipelinelineId
.
get
).
filter
(
_
.
moduleId
.
isEmpty
)))
val
pipelineFiles
=
summary
.
getPipelineId
(
runId
,
pipelineName
)
.
flatMap
(
pipelinelineId
=>
dbFiles
.
map
(
x
=>
x
.
get
(
pipelinelineId
.
get
).
getOrElse
(
Seq
())
.
filter
(
_
.
moduleId
.
isEmpty
)))
modulePages
.
flatMap
(
Future
.
sequence
(
_
)).
map
(
x
=>
ReportPage
(
x
.
toList
,
s
"$pipelineName files"
->
ReportSection
(
"/nl/lumc/sasc/biopet/core/report/files.ssp"
,
Map
(
"files"
->
Await
.
result
(
pipelineFiles
,
Duration
.
Inf
)))
::
...
...
biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/report/MultisampleReportBuilderTest.scala
View file @
205d9cc4
...
...
@@ -16,6 +16,7 @@ package nl.lumc.sasc.biopet.core.report
import
java.io.File
import
java.nio.file.Paths
import
java.sql.Date
import
com.google.common.io.Files
import
nl.lumc.sasc.biopet.utils.summary.db.SummaryDb
...
...
@@ -23,7 +24,7 @@ import org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.Test
import
scala.concurrent.
{
Await
,
Future
}
import
scala.concurrent.
{
Await
,
Future
}
import
scala.concurrent.duration.Duration
/**
...
...
@@ -54,6 +55,9 @@ class MultisampleReportBuilderTest extends TestNGSuite with Matchers {
val
db
=
SummaryDb
.
openSqliteSummary
(
dbFile
)
db
.
createTables
()
Await
.
ready
(
db
.
createPipeline
(
"test"
,
0
),
Duration
.
Inf
)
Await
.
ready
(
db
.
createRun
(
"test"
,
""
,
""
,
""
,
new
Date
(
System
.
currentTimeMillis
())),
Duration
.
Inf
)
val
sample
=
Some
(
"sampleName"
)
val
lib
=
Some
(
"libName"
)
...
...
biopet-core/src/test/scala/nl/lumc/sasc/biopet/core/report/ReportBuilderTest.scala
View file @
205d9cc4
...
...
@@ -16,14 +16,15 @@ package nl.lumc.sasc.biopet.core.report
import
java.io.File
import
java.nio.file.Paths
import
java.sql.Date
import
com.google.common.io.Files
import
nl.lumc.sasc.biopet.utils.summary.db.SummaryDb
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.
{
DataProvider
,
Test
}
import
org.testng.annotations.
{
DataProvider
,
Test
}
import
scala.concurrent.
{
Await
,
Future
}
import
scala.concurrent.
{
Await
,
Future
}
import
scala.concurrent.duration.Duration
/**
...
...
@@ -64,6 +65,8 @@ class ReportBuilderTest extends TestNGSuite with Matchers {
Await
.
result
(
db
.
createLibrary
(
libName
,
0
,
sampleId
),
Duration
.
Inf
)
}
}
Await
.
ready
(
db
.
createPipeline
(
"test"
,
0
),
Duration
.
Inf
)
Await
.
ready
(
db
.
createRun
(
"test"
,
""
,
""
,
""
,
new
Date
(
System
.
currentTimeMillis
())),
Duration
.
Inf
)
val
tempDir
=
Files
.
createTempDir
()
tempDir
.
deleteOnExit
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment