Skip to content

Instantly share code, notes, and snippets.

@magro
Created December 22, 2011 15:01
Show Gist options
  • Save magro/1510593 to your computer and use it in GitHub Desktop.
Save magro/1510593 to your computer and use it in GitHub Desktop.
couchbasemock issue
package de.javakaffee.web.msm;
import java.net.URI;
import java.util.Arrays;
import net.spy.memcached.MemcachedClient;
import org.couchbase.mock.CouchbaseMock;
public class CouchbaseMockTest {
public static void main(final String[] args) throws Exception {
final CouchbaseMock membase = new CouchbaseMock("localhost", 4096, 1, 1);
membase.start();
Thread.sleep(500);
final URI uri = new URI("http://localhost:"+ membase.getHttpPort() +"/pools");
// the following fails with an NPE...
final MemcachedClient mc = new MemcachedClient(Arrays.asList(uri), "default", "");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment