Pull yffi changes, update makefile to test all packages, fix flaky
integration tests
4 files changed,  +12, -8
M Makefile
+7, -3
 1@@ -1,7 +1,8 @@
 2 .PHONY: all build test clean libyrs libyrs-local libyrs-cross \
 3         libyrs-linux-amd64 libyrs-linux-arm64 \
 4         libyrs-freebsd-amd64 libyrs-freebsd-arm64 \
 5-        install-rust-targets update-yffi install-rust-default
 6+        install-rust-targets update-yffi install-rust-default \
 7+		integration-test
 8 
 9 # Detect platform and architecture
10 UNAME_S := $(shell uname -s)
11@@ -71,10 +72,13 @@ libyrs-local:
12 libyrs: libyrs-local
13 
14 build:
15-	go build .
16+	go build ./...
17 
18 test:
19-	go test -v .
20+	go test -v ./...
21+
22+integration-test:
23+	RUN_INTEGRATION_TESTS=1 go test -v ./...
24 
25 examples:
26 	cd examples && CGO_LDFLAGS="$(CGO_LDFLAGS)" go build .
M sync_client_integration_test.go
+2, -2
 1@@ -57,7 +57,7 @@ func TestSyncClientDisconnectReasonYSweetInitiated(t *testing.T) {
 2 	}
 3 
 4 	// Give server time to start
 5-	time.Sleep(2 * time.Second)
 6+	time.Sleep(10 * time.Second)
 7 
 8 	// Create client and connect
 9 	client, err := ysweet.NewClient(fmt.Sprintf("http://127.0.0.1:%d", port))
10@@ -138,7 +138,7 @@ func TestSyncClientDisconnectReasonDocumentIdle(t *testing.T) {
11 	}
12 
13 	// Give server time to start
14-	time.Sleep(2 * time.Second)
15+	time.Sleep(10 * time.Second)
16 
17 	// Create client and connect
18 	client, err := ysweet.NewClient(fmt.Sprintf("http://127.0.0.1:%d", port))
M yjs.go
+1, -1
1@@ -10,7 +10,7 @@ package ygo
2 import "C"
3 
4 // Version of the yffi library we're binding to
5-const YFFIVersion = "0.25.0"
6+const YFFIVersion = "v0.25.0"
7 
8 // Utility function to convert Go string to C string (must be freed by caller)
9 func stringToC(s string) *C.char {
M ysweet/proxy_integration_test.go
+2, -2
 1@@ -66,7 +66,7 @@ func TestProxyHandler_Integration(t *testing.T) {
 2 	}
 3 
 4 	// Give server time to start
 5-	time.Sleep(2 * time.Second)
 6+	time.Sleep(10 * time.Second)
 7 
 8 	// Create y-sweet client to create a document
 9 	client, err := ysweet.NewClient(fmt.Sprintf("http://127.0.0.1:%d", port))
10@@ -321,7 +321,7 @@ func TestProxyHandler_IntegrationWithCustomURLPattern(t *testing.T) {
11 	}
12 
13 	// Give server time to start
14-	time.Sleep(2 * time.Second)
15+	time.Sleep(10 * time.Second)
16 
17 	// Create y-sweet client to create a document
18 	client, err := ysweet.NewClient(fmt.Sprintf("http://127.0.0.1:%d", port))