Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use strings for IDs instead of typeId type #183

Merged
merged 6 commits into from
Mar 4, 2024
Merged

Conversation

phoebe-lew
Copy link
Contributor

closes #182

Copy link

codecov bot commented Feb 26, 2024

Codecov Report

Merging #183 (3e6953e) into main (a9224b0) will decrease coverage by 0.55%.
Report is 3 commits behind head on main.
The diff coverage is 78.26%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #183      +/-   ##
==========================================
- Coverage   77.58%   77.03%   -0.55%     
==========================================
  Files          33       33              
  Lines         812      810       -2     
  Branches       80       80              
==========================================
- Hits          630      624       -6     
- Misses        135      139       +4     
  Partials       47       47              
Components Coverage Δ
protocol 82.93% <78.26%> (-1.20%) ⬇️
httpclient 78.36% <ø> (-0.11%) ⬇️

* @return An [Exchange] containing the requested exchange.
* @throws TbdexResponseException for request or response errors.
*/
fun getExchange(pfiDid: String, requesterDid: Did, exchangeId: TypeId): Exchange {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rip

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

salut

Co-authored-by: Diane Huxley <dhuxley@tbd.email>
@@ -55,7 +55,7 @@ class SubmitCloseTest : ServerTest() {

@Test
fun `returns NotFound if exchange doesn't exist`() = runBlocking {
val close = createClose(TypeId.generate(MessageKind.close.name))
val close = createClose(TypeId.generate(MessageKind.rfq.name).toString())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@@ -107,7 +107,7 @@ class TbdexHttpClientTest {

server.enqueue(MockResponse().setResponseCode(HttpURLConnection.HTTP_ACCEPTED))

val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering"))
val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering").toString())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -116,7 +116,7 @@ class TbdexHttpClientTest {

server.enqueue(MockResponse().setResponseCode(HttpURLConnection.HTTP_ACCEPTED))

val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering"))
val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering").toString())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -144,7 +144,7 @@ class TbdexHttpClientTest {
.setResponseCode(HttpURLConnection.HTTP_BAD_REQUEST)
)

val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering"))
val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering").toString())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -176,7 +176,7 @@ class TbdexHttpClientTest {
.setResponseCode(HttpURLConnection.HTTP_BAD_REQUEST)
)

val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering"))
val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering").toString())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -60,7 +57,7 @@ exceptions:
ReturnFromFinally:
active: true
SwallowedException:
active: true
active: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know there's a couple places where we're suppressing this exception and it is not pretty, but i think we want this check for when we're accidentally eating an exception without doing something about it

@phoebe-lew phoebe-lew merged commit 1689d87 into main Mar 4, 2024
4 of 6 checks passed
@phoebe-lew phoebe-lew deleted the plew.id-types branch March 4, 2024 17:44
@jiyoonie9 jiyoonie9 linked an issue Mar 29, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OfferingId Type Issues API Leak: de.fxlae:typeid-java-jdk8
3 participants