Ejemplo n.º 1
0
 {
   connectionInfo = new FbServiceProperties();
   connectionInfo.setServerName(FBTestProperties.DB_SERVER_URL);
   connectionInfo.setPortNumber(FBTestProperties.DB_SERVER_PORT);
   connectionInfo.setUser(DB_USER);
   connectionInfo.setPassword(DB_PASSWORD);
 }
Ejemplo n.º 2
0
  @Test
  public void testBasicStatusVectorProcessing_wrongService() throws Exception {
    // set invalid database
    final String invalidServiceName = "doesnotexist";
    connectionInfo.setServiceName(invalidServiceName);
    try (JnaService service = factory.serviceConnect(connectionInfo)) {

      expectedException.expect(
          allOf(isA(SQLException.class), fbMessageStartsWith(ISCConstants.isc_service_att_err)));

      service.attach();
    }
  }
Ejemplo n.º 3
0
  @Test
  public void basicStatusVectorProcessing_wrongLogin() throws Exception {
    // set invalid password
    connectionInfo.setPassword("abcd");
    try (JnaService service = factory.serviceConnect(connectionInfo)) {

      expectedException.expect(
          allOf(
              isA(SQLException.class),
              message(startsWith(getFbMessage(ISCConstants.isc_login))),
              errorCode(equalTo(ISCConstants.isc_login))));

      service.attach();
    }
  }