77 */
88package com.owncloud.android.lib.resources.tags
99
10- import com.nextcloud.operations.DeleteMethod
1110import com.nextcloud.test.RandomStringGenerator
1211import com.owncloud.android.AbstractIT
1312import com.owncloud.android.lib.common.network.WebdavEntry
@@ -20,6 +19,7 @@ import junit.framework.TestCase.assertEquals
2019import junit.framework.TestCase.assertNotNull
2120import junit.framework.TestCase.assertTrue
2221import org.apache.commons.httpclient.HttpStatus
22+ import org.apache.jackrabbit.webdav.client.methods.DeleteMethod
2323import org.apache.jackrabbit.webdav.client.methods.PropPatchMethod
2424import org.apache.jackrabbit.webdav.property.DavPropertyNameSet
2525import org.apache.jackrabbit.webdav.property.DavPropertySet
@@ -39,7 +39,9 @@ class GetTagsRemoteOperationIT : AbstractIT() {
3939 @After
4040 fun deleteCreatedTags () {
4141 createdTags.forEach {
42- DeleteMethod (client.baseUri.toString() + TAG_URL + it.id, true ).execute(nextcloudClient)
42+ val deleteMethod = DeleteMethod (client2.baseUri.toString() + TAG_URL + it.id)
43+ client2.executeMethod(deleteMethod)
44+ deleteMethod.releaseConnection()
4345 }
4446 createdTags.clear()
4547 }
@@ -78,7 +80,6 @@ class GetTagsRemoteOperationIT : AbstractIT() {
7880 assertTrue(sut.isSuccess)
7981 assertEquals(count + 2 , sut.resultData.size)
8082
81- // add color to one tag
8283 val plainColor = " ff00ff"
8384 val colorWithHex = " #$plainColor "
8485 val newProps = DavPropertySet ()
@@ -91,11 +92,11 @@ class GetTagsRemoteOperationIT : AbstractIT() {
9192 )
9293 val propPatchMethod =
9394 PropPatchMethod (
94- client .baseUri.toString() + TAG_URL + tag1.id,
95+ client2 .baseUri.toString() + TAG_URL + tag1.id,
9596 newProps,
9697 DavPropertyNameSet ()
9798 )
98- val propPatchStatus = client .executeMethod(propPatchMethod)
99+ val propPatchStatus = client2 .executeMethod(propPatchMethod)
99100 propPatchMethod.releaseConnection()
100101 assertEquals(HttpStatus .SC_MULTI_STATUS , propPatchStatus)
101102
0 commit comments