Skip to content

Commit f5c0525

Browse files
committed
Check how pljava.libjvm_location has been set
1 parent 0334812 commit f5c0525

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

CI/integration

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,40 @@ try (
233233

234234
succeeding = true; // become optimistic, will be using &= below
235235

236+
succeeding &= stateMachine(
237+
"check pljava.libjvm_location",
238+
null,
239+
240+
q(c, "SHOW pljava.libjvm_location")
241+
.flatMap(Node::semiFlattenDiagnostics),
242+
243+
// state 1: consume any diagnostics, or to state 2 with same item
244+
(o,p,q) -> {
245+
if ( ! isDiagnostic(o, Set.of("error")) )
246+
return -2;
247+
Node.peek(o);
248+
return 1;
249+
},
250+
251+
(o,p,q) -> { // state 2
252+
if ( ! ( o instanceof ResultSet ) )
253+
return false;
254+
ResultSet rs = (ResultSet)o;
255+
if ( ! rs.next() )
256+
return false;
257+
System.err.println("pljava.libjvm_location: " + rs.getString(1));
258+
if ( rs.next() )
259+
return false;
260+
return 3;
261+
},
262+
263+
// state 3: must be end of input
264+
(o,p,q) -> null == o
265+
);
266+
}
267+
268+
try ( Connection c = n1.connect() )
269+
{
236270
succeeding &= stateMachine(
237271
"create extension no result",
238272
null,

0 commit comments

Comments
 (0)