Open ronreynolds opened 1 month ago
another one? https://github.com/smartsheet/smartsheet-java-sdk/actions/runs/10328241018/job/28594521252?pr=88#step:5:317 (it appears Folder was created but then not found in the subsequent listFolders call)
FolderResourcesIT > testFolderMethods() FAILED
org.opentest4j.AssertionFailedError:
expected: 1
but was: 0
at java.base@11.0.24/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base@11.0.24/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base@11.0.24/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at app//com.smartsheet.api.integrationtest.FolderResourcesIT.testListFoldersInFolder(FolderResourcesIT.java:102)
at app//com.smartsheet.api.integrationtest.FolderResourcesIT.testFolderMethods(FolderResourcesIT.java:55)
i believe this test failure is due to a create/read request pair that's too close together.
the most likely reason is replication-delay between the grid-shard-db's writable primary and the read-only replica from which another server tried to read (if it was the same server it would have found a cached copy of the grid). i believe grid-reads are always from replica so if you quickly create a new sheet and there's replication lag trying to read it back will result in a failure to find the sheet in the grid-shard-db replica).
not sure what the fix is - just introducing lag is silly; possibly some fault-tolerance with retry + backoff?