Skip to content

Commit

Permalink
TEIID-4031 removing the length check
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins committed Mar 21, 2016
1 parent a6a8571 commit f537a94
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -52,6 +52,7 @@
import org.teiid.adminapi.Admin;
import org.teiid.adminapi.AdminException;
import org.teiid.adminapi.jboss.AdminFactory;
import org.teiid.core.TeiidRuntimeException;
import org.teiid.core.util.ObjectConverterUtil;
import org.teiid.core.util.ReaderInputStream;
import org.teiid.core.util.UnitTestUtil;
Expand Down Expand Up @@ -125,8 +126,6 @@ public void testGetOperation() throws Exception {
//test swagger
response = httpCall("http://localhost:8080/sample_1/swagger.yaml", "GET", null);

assertEquals(13206, response.length());

admin.undeploy("sample-vdb.xml");
Thread.sleep(2000);
}
Expand Down Expand Up @@ -233,6 +232,12 @@ private String httpCall(String url, String method, String params) throws Excepti
wr.write(params);
wr.flush();
}

int code = connection.getResponseCode();
if (code >= 400) {
throw new TeiidRuntimeException(String.valueOf(code));
}

return ObjectConverterUtil.convertToString(new InputStreamReader(connection.getInputStream(), Charset.forName("UTF-8")));
}
}

0 comments on commit f537a94

Please sign in to comment.