@@ -92,20 +92,25 @@ class UtplsqlRunner implements RealtimeReporterEventConsumer {
92
92
93
93
}
94
94
95
- private def dispatch doProcess ( PreRunEvent event ) {
95
+ private def initRun ( ) {
96
96
run = new Run (reporterId, connectionName)
97
97
run. startTime = sysdate
98
98
run. counter. disabled = 0
99
99
run. counter. success = 0
100
100
run. counter. failure = 0
101
101
run. counter. error = 0
102
102
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 ) {
103
110
run. totalNumberOfTests = event. totalNumberOfTests
104
111
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)
109
114
}
110
115
111
116
private def dispatch doProcess (PostRunEvent event ) {
@@ -115,8 +120,8 @@ class UtplsqlRunner implements RealtimeReporterEventConsumer {
115
120
run. counter = event. counter
116
121
run. errorStack = event. errorStack
117
122
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)
120
125
}
121
126
122
127
private def dispatch doProcess (PreSuiteEvent event ) {
@@ -134,8 +139,8 @@ class UtplsqlRunner implements RealtimeReporterEventConsumer {
134
139
} else {
135
140
test. startTime = sysdate
136
141
}
137
- panel . status = ' ' ' « event.id» ' ' '
138
- panel. updateCounter
142
+ run . status = event. id
143
+ panel. update(reporterId)
139
144
}
140
145
141
146
private def dispatch doProcess (PostTestEvent event ) {
@@ -155,7 +160,7 @@ class UtplsqlRunner implements RealtimeReporterEventConsumer {
155
160
run. counter. failure = run. counter. failure + event. counter. failure
156
161
run. counter. error = run. counter. error + event. counter. error
157
162
run. counter. warning = run. counter. warning + event. counter. warning
158
- panel. updateCounter
163
+ panel. update(reporterId)
159
164
}
160
165
161
166
private def void produce () {
@@ -183,18 +188,23 @@ class UtplsqlRunner implements RealtimeReporterEventConsumer {
183
188
def runTestAsync () {
184
189
// show dockable
185
190
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
+ }
198
208
}
199
209
200
210
def getProducerThread () {
0 commit comments