Пример #1
0
  @Test
  public void linux_x86_64_socket() throws Exception {

    linuxOnly();

    DisqueClient disqueClient =
        new DisqueClient(DisqueURI.Builder.disqueSocket(TestSettings.socket()).build());

    DisqueCommands<String, String> connection = disqueClient.connect().sync();

    connection.debugFlushall();
    connection.ping();

    disqueClient.shutdown(0, 0, TimeUnit.SECONDS);
  }
Пример #2
0
  @Test
  public void differentSocketTypes() throws Exception {

    DisqueClient disqueClient =
        new DisqueClient(
            DisqueURI.Builder.disqueSocket(TestSettings.socket())
                .withDisque(TestSettings.host())
                .build());

    try {
      disqueClient.connect();
    } catch (Exception e) {
      assertThat(e).hasMessageContaining("You cannot mix unix");
    }

    disqueClient.shutdown(0, 0, TimeUnit.SECONDS);
  }