Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexander Lehmann alexlehm

View GitHub Profile
@alexlehm
alexlehm / fact.pl
Last active Oct 25, 2018
720! calculation with Perl and bigint
View fact.pl
#! /usr/bin/perl
use bigint;
$f=1;
for($i=1;$i<=720;$i++) {
$f*=$i;
}
@alexlehm
alexlehm / AsyncTest.java
Last active May 25, 2017
AsyncTest.java
View AsyncTest.java
package cx.lehmann.vertx;
import org.junit.Test;
import org.junit.runner.RunWith;
import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;
import io.vertx.ext.unit.Async;
import io.vertx.ext.unit.TestContext;
import io.vertx.ext.unit.junit.VertxUnitRunner;
@alexlehm
alexlehm / HttpKeepAliveClientTest.java
Created May 14, 2017
HttpKeepAliveClientTest.java
View HttpKeepAliveClientTest.java
package cx.lehmann.vertx;
import org.junit.Test;
import org.junit.runner.RunWith;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpClient;
import io.vertx.core.http.HttpClientOptions;
import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;
@alexlehm
alexlehm / HttpKeepAliveClientTest.java
Created May 10, 2017
HttpKeepAliveClientTest.java
View HttpKeepAliveClientTest.java
package cx.lehmann.vertx;
import org.junit.Test;
import org.junit.runner.RunWith;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpClient;
import io.vertx.core.http.HttpClientOptions;
import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;
View http.diff
diff --git a/src/test/java/httpclientpool/HttpClientPoolTest.java b/src/test/java/httpclientpool/HttpClientPoolTest.java
index 9a0e7d0..e5d0abe 100644
--- a/src/test/java/httpclientpool/HttpClientPoolTest.java
+++ b/src/test/java/httpclientpool/HttpClientPoolTest.java
@@ -21,6 +21,7 @@ import io.vertx.ext.unit.Async;
import io.vertx.ext.unit.TestContext;
import io.vertx.ext.unit.junit.VertxUnitRunner;
+import static org.mockserver.matchers.Times.exactly;
View Log4j2LogDelegate.java
/*
* Copyright (c) 2011-2015 The original author or authors
* ------------------------------------------------------
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
*
View LoginServiceTest.java
import java.io.IOException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpClientRequest;
import io.vertx.core.logging.Logger;
View DnsNameResolver.java
/*
* Copyright 2015 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@alexlehm
alexlehm / UnknownHostExceptionTest.java
Created Jul 29, 2016
UnknownHostExceptionTest.java
View UnknownHostExceptionTest.java
import org.junit.Test;
import io.vertx.core.impl.VertxImpl;
import io.vertx.test.core.VertxTestBase;
/**
* @author <a href="http://oss.lehmann.cx/">Alexander Lehmann</a>
*
*/
public class UnknownHostExceptionTest extends VertxTestBase {
@alexlehm
alexlehm / NetClientTLSConnectTest.java
Created Jul 11, 2016
NetClientTLSConnectTest.java
View NetClientTLSConnectTest.java
package cx.lehmann.vertx;
import org.junit.Test;
import org.junit.runner.RunWith;
import io.vertx.core.Vertx;
import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;
import io.vertx.core.net.NetClient;
import io.vertx.core.net.NetClientOptions;
You can’t perform that action at this time.