exasol / udf-debugging-java

Utilities for debugging, profiling and code coverage measure for UDFs.
MIT License
1 stars 1 forks source link

Enhance interface LocalServiceExposer and simplify usage #53

Closed ckunki closed 1 year ago

ckunki commented 1 year ago

Add convenience method to interface LocalServiceExposer

  public static LocalServiceExposer withoutPortMapping(final String host) {
    return port ->  new InetSocketAddress(host, port);
  }

Method forRemoteHost() can then be used in the following classes in project udf-debugging-java:

Change constructor of UdfTestSetup

Furthermore the constructor of UdfTestSetup can be simplified into

public UdfTestSetup(final ExasolTestSetup testSetup, final Connection exasolConnection) {
    return new UdfTestSetup(testSetup::makeLocalTcpServiceAccessibleFromDatabase,
        testSetup.getDefaultBucket(), exasolConnection);
}