@@ -92,20 +92,25 @@ class UtplsqlRunner implements RealtimeReporterEventConsumer {
9292
9393 }
9494
95- private def dispatch doProcess ( PreRunEvent event ) {
95+ private def initRun ( ) {
9696 run = new Run (reporterId, connectionName)
9797 run. startTime = sysdate
9898 run. counter. disabled = 0
9999 run. counter. success = 0
100100 run. counter. failure = 0
101101 run. counter. error = 0
102102 run. counter. warning = 0
103+ run. totalNumberOfTests = - 1
104+ run. status = UtplsqlResources . getString(" RUNNER_INITIALIZING_TEXT" )
105+ panel. model = run
106+ panel. update(reporterId)
107+ }
108+
109+ private def dispatch doProcess (PreRunEvent event ) {
103110 run. totalNumberOfTests = event. totalNumberOfTests
104111 run. put(event. items)
105- panel. model = run
106- panel. status = UtplsqlResources . getString(" RUNNER_INITIALIZING_TEXT" )
107- panel. updateCounter
108-
112+ run. status = UtplsqlResources . getString(" RUNNER_RUNNING_TEXT" )
113+ panel. update(reporterId)
109114 }
110115
111116 private def dispatch doProcess (PostRunEvent event ) {
@@ -115,8 +120,8 @@ class UtplsqlRunner implements RealtimeReporterEventConsumer {
115120 run. counter = event. counter
116121 run. errorStack = event. errorStack
117122 run. serverOutput = event. serverOutput
118- panel . status = String . format(UtplsqlResources . getString(" RUNNER_FINNISHED_TEXT" ), event. executionTime)
119- panel. updateCounter
123+ run . status = String . format(UtplsqlResources . getString(" RUNNER_FINNISHED_TEXT" ), event. executionTime)
124+ panel. update(reporterId)
120125 }
121126
122127 private def dispatch doProcess (PreSuiteEvent event ) {
@@ -134,8 +139,8 @@ class UtplsqlRunner implements RealtimeReporterEventConsumer {
134139 } else {
135140 test. startTime = sysdate
136141 }
137- panel . status = ' ' ' « event.id» ' ' '
138- panel. updateCounter
142+ run . status = event. id
143+ panel. update(reporterId)
139144 }
140145
141146 private def dispatch doProcess (PostTestEvent event ) {
@@ -155,7 +160,7 @@ class UtplsqlRunner implements RealtimeReporterEventConsumer {
155160 run. counter. failure = run. counter. failure + event. counter. failure
156161 run. counter. error = run. counter. error + event. counter. error
157162 run. counter. warning = run. counter. warning + event. counter. warning
158- panel. updateCounter
163+ panel. update(reporterId)
159164 }
160165
161166 private def void produce () {
@@ -183,18 +188,23 @@ class UtplsqlRunner implements RealtimeReporterEventConsumer {
183188 def runTestAsync () {
184189 // show dockable
185190 val dockable = RunnerFactory . dockable as RunnerView
186- RunnerFactory . showDockable;
187- panel = dockable? . runnerPanel
188- // the producer
189- val Runnable producer = [|produce]
190- producerThread = new Thread (producer)
191- producerThread. name = " realtime producer"
192- producerThread. start
193- // the consumer
194- val Runnable consumer = [|consume]
195- consumerThread = new Thread (consumer)
196- consumerThread. name = " realtime consumer"
197- consumerThread. start
191+ if (dockable == = null ) {
192+ logger. severe(' ' ' Error getting utPLSQL dockable. Cannot run utPLSQL test.' ' ' )
193+ } else {
194+ RunnerFactory . showDockable;
195+ panel = dockable. runnerPanel
196+ initRun
197+ // the producer
198+ val Runnable producer = [|produce]
199+ producerThread = new Thread (producer)
200+ producerThread. name = " realtime producer"
201+ producerThread. start
202+ // the consumer
203+ val Runnable consumer = [|consume]
204+ consumerThread = new Thread (consumer)
205+ consumerThread. name = " realtime consumer"
206+ consumerThread. start
207+ }
198208 }
199209
200210 def getProducerThread () {
0 commit comments