@Test void loadFromProperties() throws NoSuchFieldException, IllegalAccessException { InfluxDBClientReactive influxDBClient = InfluxDBClientReactiveFactory.create(); InfluxDBClientOptions options = getDeclaredField(influxDBClient, "options", AbstractInfluxDBClient.class); Assertions.assertThat(options.getUrl()).isEqualTo("http: Assertions.assertThat(options.getOrg()).isEqualTo("my-org"); Assertions.assertThat(options.getBucket()).isEqualTo("my-bucket"); Assertions.assertThat(options.getToken()).isEqualTo("my-token".toCharArray()); Assertions.assertThat(options.getLogLevel()).isEqualTo(LogLevel.BODY); Assertions.assertThat(influxDBClient.getLogLevel()).isEqualTo(LogLevel.BODY); Retrofit retrofit = getDeclaredField(influxDBClient, "retrofit", AbstractInfluxDBClient.class); OkHttpClient okHttpClient = (OkHttpClient) retrofit.callFactory(); Assertions.assertThat(okHttpClient.readTimeoutMillis()).isEqualTo(5_000); Assertions.assertThat(okHttpClient.writeTimeoutMillis()).isEqualTo(10_000); Assertions.assertThat(okHttpClient.connectTimeoutMillis()).isEqualTo(5_000); }
@Nonnull public static InfluxDBClientReactive create() { InfluxDBClientOptions options = InfluxDBClientOptions.builder() .loadProperties() .build(); return create(options); }
InfluxDBClientReactiveFactory { @Nonnull public static InfluxDBClientReactive create() { InfluxDBClientOptions options = InfluxDBClientOptions.builder() .loadProperties() .build(); return create(options); } }
InfluxDBClientReactiveFactory { @Nonnull public static InfluxDBClientReactive create() { InfluxDBClientOptions options = InfluxDBClientOptions.builder() .loadProperties() .build(); return create(options); } private  InfluxDBClientReactiveFactory(); }
InfluxDBClientReactiveFactory { @Nonnull public static InfluxDBClientReactive create() { InfluxDBClientOptions options = InfluxDBClientOptions.builder() .loadProperties() .build(); return create(options); } private  InfluxDBClientReactiveFactory(); @Nonnull static InfluxDBClientReactive create(); @Nonnull static InfluxDBClientReactive create(@Nonnull final String connectionString); @Nonnull static InfluxDBClientReactive create(@Nonnull final String url,
                                                @Nonnull final String username,
                                                @Nonnull final char[] password); @Nonnull static InfluxDBClientReactive create(@Nonnull final String url, @Nonnull final char[] token); @Nonnull static InfluxDBClientReactive create(@Nonnull final String url,
                                                @Nonnull final char[] token,
                                                @Nullable final String org); @Nonnull static InfluxDBClientReactive create(@Nonnull final String url,
                                                @Nonnull final char[] token,
                                                @Nullable final String org,
                                                @Nullable final String bucket); @Nonnull static InfluxDBClientReactive create(@Nonnull final InfluxDBClientOptions options); }
InfluxDBClientReactiveFactory { @Nonnull public static InfluxDBClientReactive create() { InfluxDBClientOptions options = InfluxDBClientOptions.builder() .loadProperties() .build(); return create(options); } private  InfluxDBClientReactiveFactory(); @Nonnull static InfluxDBClientReactive create(); @Nonnull static InfluxDBClientReactive create(@Nonnull final String connectionString); @Nonnull static InfluxDBClientReactive create(@Nonnull final String url,
                                                @Nonnull final String username,
                                                @Nonnull final char[] password); @Nonnull static InfluxDBClientReactive create(@Nonnull final String url, @Nonnull final char[] token); @Nonnull static InfluxDBClientReactive create(@Nonnull final String url,
                                                @Nonnull final char[] token,
                                                @Nullable final String org); @Nonnull static InfluxDBClientReactive create(@Nonnull final String url,
                                                @Nonnull final char[] token,
                                                @Nullable final String org,
                                                @Nullable final String bucket); @Nonnull static InfluxDBClientReactive create(@Nonnull final InfluxDBClientOptions options);  }