-
Notifications
You must be signed in to change notification settings - Fork 0
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
Testing transport and server #359
base: main
Are you sure you want to change the base?
Conversation
…ortId allow stable gRPC call with bundle-server
file attachment works
…client downloadBundle
…run when TransportToBundleServerManager is moved to bundle-core.
…anged ServerUploadFragment imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good. it's missing the test of the public interface run().
perhaps you can add a test for that in another PR. ideally you would instantiate a TransportToBundleServerManager and call the run method and see if you get the expected results. you should have test cases for nothing to download, bad server public key, something to download and something to upload, something to download and something to upload that has already been uploaded.
@@ -4,6 +4,7 @@ | |||
import static java.util.logging.Level.INFO; | |||
import static java.util.logging.Level.SEVERE; | |||
|
|||
import android.content.Context; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did this and the other import get added? i don't see them used.
@@ -14,15 +13,14 @@ | |||
// |_ BundleTransmission | |||
// |_ client - bundles to send to client + recencyBlob | |||
// |_ server - bundles to send to server | |||
|
|||
public class TransportPaths { | |||
public class TransportPaths{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix the space
private static final Logger logger = Logger.getLogger(TransportPaths.class.getName()); | ||
|
||
public final Path toClientPath; | ||
|
||
public final Path toServerPath; | ||
|
||
public TransportPaths(Path rootDir) { | ||
public TransportPaths(Path rootDir){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix the space
@@ -21,6 +21,7 @@ | |||
import io.grpc.InsecureServerCredentials; | |||
import io.grpc.Server; | |||
import io.grpc.stub.StreamObserver; | |||
import net.discdd.transport.TransportToBundleServerManager; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is this being used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's being used in the getRecencyBlob method to get the RECENCY_BLOB_BIN from TransportToBundleServerManager.
|
||
import com.google.protobuf.ByteString; | ||
import io.grpc.Grpc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are these grpc imports needed?
void tearDownEach() throws IOException { | ||
// Clean up directories and files | ||
if (Files.exists(toClientPath)) { | ||
Files.walk(toClientPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should refactor this into a recursiveDelete method so that you don't duplicate it below.
No description provided.