/** * URL with context path and index.html reference * * <pre> * http://localhost:9999/bigdata/index.html * </pre> * * This URL does NOT get mapped to anything (404). */ public void test_webapp_structure_contextPath_indexHtml() throws Exception { try { doGET(m_serviceURL + "/index.html"); } catch (HttpException ex) { assertEquals(404, ex.getStatusCode()); } }
/** * Verify fail create properties if * properties are not compatible. */ public void test_getPreparedPropertiesCompatibility() throws Exception { String namespace = "newNamespace"; Properties properties = new Properties(); properties.put(RemoteRepository.OPTION_CREATE_KB_NAMESPACE, namespace); final Properties p = m_mgr.getPreparedProperties(namespace, properties); properties.put("com.bigdata.rdf.sail.truthMaintenance", "true"); properties.put("com.bigdata.rdf.store.AbstractTripleStore.quads", "true"); try { m_mgr.getPreparedProperties(namespace, properties); fail("Expecting: " + HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } catch (HttpException ex) { assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex.getStatusCode()); } }
/** * URL with context path and index.html reference * * <pre> * http://localhost:9999/bigdata/index.html * </pre> * * This URL does NOT get mapped to anything (404). */ public void test_webapp_structure_contextPath_indexHtml() throws Exception { try { doGET(m_serviceURL + "/index.html"); } catch (HttpException ex) { assertEquals(404, ex.getStatusCode()); } }
/** * Test verifies rejecting an incorrect string as a namespace name. * * @throws Exception */ public void test_create03() throws Exception { final List<String> incorrectNamespaces = Arrays.asList("", "te.st"); for(String incorrectNamespace:incorrectNamespaces){ try { doTestCreate(incorrectNamespace); fail("Expecting: " + HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } catch (HttpException ex) { assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex.getStatusCode()); } } }
found = true; } catch (HttpException ex) { if (ex.getStatusCode() == HttpServletResponse.SC_NOT_FOUND) { found = false;
/** * URL with context path and index.html reference * * <pre> * http://localhost:9999/bigdata/index.html * </pre> * * This URL does NOT get mapped to anything (404). */ public void test_webapp_structure_contextPath_indexHtml() throws Exception { try { doGET(m_serviceURL + "/index.html"); } catch (HttpException ex) { assertEquals(404, ex.getStatusCode()); } }
/** * URL with context path and index.html reference * * <pre> * http://localhost:9999/bigdata/index.html * </pre> * * This URL does NOT get mapped to anything (404). */ public void test_webapp_structure_contextPath_indexHtml() throws Exception { try { doGET(m_serviceURL + "/index.html"); } catch (HttpException ex) { assertEquals(404, ex.getStatusCode()); } }
/** * Verify fail create properties if * properties are not compatible. */ public void test_getPreparedPropertiesCompatibility() throws Exception { String namespace = "newNamespace"; Properties properties = new Properties(); properties.put(RemoteRepository.OPTION_CREATE_KB_NAMESPACE, namespace); final Properties p = m_mgr.getPreparedProperties(namespace, properties); properties.put("com.bigdata.rdf.sail.truthMaintenance", "true"); properties.put("com.bigdata.rdf.store.AbstractTripleStore.quads", "true"); try { m_mgr.getPreparedProperties(namespace, properties); fail("Expecting: " + HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } catch (HttpException ex) { assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex.getStatusCode()); } }
} catch (HttpException ex) { assertEquals(404, ex.getStatusCode());
/** * Test verifies rejecting an incorrect string as a namespace name. * * @throws Exception */ public void test_create03() throws Exception { final List<String> incorrectNamespaces = Arrays.asList("", "te.st"); for(String incorrectNamespace:incorrectNamespaces){ try { doTestCreate(incorrectNamespace); fail("Expecting: " + HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } catch (HttpException ex) { assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex.getStatusCode()); } } }
switch (ex.getStatusCode()) { case 404: // GONE throw new RemoteTransactionNotFoundException(txId,
} catch (HttpException ex) { assertEquals(404,ex.getStatusCode()); assertEquals(HttpServletResponse.SC_CONFLICT, ex.getStatusCode()); } catch (HttpException ex) { assertEquals(BigdataServlet.HTTP_NOTFOUND, ex.getStatusCode()); } catch (HttpException ex) { assertEquals(BigdataServlet.HTTP_NOTFOUND, ex.getStatusCode()); } catch (HttpException ex) { assertEquals(BigdataServlet.HTTP_NOTFOUND, ex.getStatusCode()); } finally { if (result != null) } catch (HttpException ex) { assertEquals(BigdataServlet.HTTP_NOTFOUND, ex.getStatusCode());
switch (ex.getStatusCode()) { case 404: // GONE throw new RemoteTransactionNotFoundException(txId,
switch (ex.getStatusCode()) { case 404: // GONE throw new RemoteTransactionNotFoundException(txId,
switch (ex.getStatusCode()) { case 404: // GONE throw new RemoteTransactionNotFoundException(txId,
assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex.getStatusCode()); assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex.getStatusCode());
found = true; } catch (HttpException ex) { if (ex.getStatusCode() == HttpServletResponse.SC_NOT_FOUND) { found = false;
} catch (HttpException ex) { assertEquals(404, ex.getStatusCode());
} catch (HttpException ex) { assertEquals(404,ex.getStatusCode()); assertEquals(HttpServletResponse.SC_CONFLICT, ex.getStatusCode()); } catch (HttpException ex) { assertEquals(BigdataServlet.HTTP_NOTFOUND, ex.getStatusCode()); } catch (HttpException ex) { assertEquals(BigdataServlet.HTTP_NOTFOUND, ex.getStatusCode()); } catch (HttpException ex) { assertEquals(BigdataServlet.HTTP_NOTFOUND, ex.getStatusCode()); } finally { if (result != null) } catch (HttpException ex) { assertEquals(BigdataServlet.HTTP_NOTFOUND, ex.getStatusCode());
assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex.getStatusCode()); assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex.getStatusCode());