MCPcopy Create free account
hub / github.com/BaseXdb/basex / init

Method init

basex-tests/src/test/java/org/basex/server/XMarkTest.java:122–132  ·  view source on GitHub ↗

Initializes the tests. @throws Exception any exception

()

Source from the content-addressed store, hash-verified

120 * @throws Exception any exception
121 */
122 @BeforeAll public static void init() throws Exception {
123 // only start server if it is not already running
124 if(!BaseXServer.ping(StaticOptions.HOST.value(), StaticOptions.PORT.value()))
125 server = createServer();
126
127 try(ClientSession cs = createClient(UserText.ADMIN, NAME)) {
128 cs.execute("CREATE DB " + DB + " " + DBFILE);
129 cs.execute("CREATE USER xmark xmark");
130 cs.execute("GRANT read ON " + DB + " TO xmark");
131 }
132 }
133
134 /**
135 * Initializes the tests.

Callers

nothing calls this directly

Calls 5

pingMethod · 0.95
createServerMethod · 0.80
createClientMethod · 0.80
executeMethod · 0.65
valueMethod · 0.45

Tested by

no test coverage detected