Skip to content

Commit

Permalink
Merge pull request webmetrics#55 from andyclark/feature/fix-har-resul…
Browse files Browse the repository at this point in the history
…ts-stats-on-windows

Fixes HarResultsTest on Windows
  • Loading branch information
lightbody committed Jan 8, 2014
2 parents 1f236f5 + 427a240 commit 7a27a03
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/test/java/net/lightbody/bmp/proxy/HarResultsTest.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package net.lightbody.bmp.proxy;

import java.util.List;

import net.lightbody.bmp.core.har.Har;
import net.lightbody.bmp.core.har.HarEntry;
import net.lightbody.bmp.core.har.HarLog;

import org.apache.http.client.methods.HttpGet;
import static org.hamcrest.CoreMatchers.*;
import org.junit.Assert;
import org.junit.Test;

import java.util.List;

public class HarResultsTest extends DummyServerTest {
@Test
public void testRequestAndResponseSizesAreSet() throws Exception {
Expand All @@ -28,7 +30,8 @@ public void testRequestAndResponseSizesAreSet() throws Exception {

Assert.assertEquals(100, entry.getRequest().getHeadersSize());
Assert.assertEquals(0, entry.getRequest().getBodySize());
Assert.assertEquals(227, entry.getResponse().getHeadersSize());
// 226 for Windows, 227 for other platforms? Can it be that simple?
Assert.assertThat((int)entry.getResponse().getHeadersSize(), anyOf(is(226),is(227)));
Assert.assertEquals(13, entry.getResponse().getBodySize());
}

Expand Down

0 comments on commit 7a27a03

Please sign in to comment.