Skip to content

Instantly share code, notes, and snippets.

View jdelStrother's full-sized avatar
👋

Jonathan del Strother jdelStrother

👋
View GitHub Profile
diff --git a/activerecord/test/cases/migration/change_schema_test.rb b/activerecord/test/cases/migration/change_schema_test.rb
index ab61a4d..3fbd110 100644
--- a/activerecord/test/cases/migration/change_schema_test.rb
+++ b/activerecord/test/cases/migration/change_schema_test.rb
@@ -17,6 +18,27 @@ module ActiveRecord
ActiveRecord::Base.primary_key_prefix_type = nil
end
+ def test_add_column_persists_values
+ connection.create_table :testings do |t|
diff --git a/activerecord/test/cases/migration/change_schema_test.rb b/activerecord/test/cases/migration/change_schema_test.rb
index ab61a4d..3fbd110 100644
--- a/activerecord/test/cases/migration/change_schema_test.rb
+++ b/activerecord/test/cases/migration/change_schema_test.rb
@@ -17,6 +18,27 @@ module ActiveRecord
ActiveRecord::Base.primary_key_prefix_type = nil
end
+ def test_add_column_persists_values
+ connection.create_table :testings do |t|
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index a448e0a..6d3b0a8 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -1708,6 +1708,18 @@ if ActiveRecord::Base.connection.supports_migrations?
end
end
+ def test_add_column_persists_values
+ Person.create!
@protocol NamedObject <NSObject>
-(NSString*)name;
@end
/////////////////
@interface User : NSObject
-(NSString*)name;
@end
@protocol NamedObject <NSObject>
-(NSString*)name;
@end
/////////////////
@interface User : NSObject
-(NSString*)name;
@end
Process: MacLight [45909]
Path: /Users/USER/Downloads/MacLightWebcam.app/Contents/MacOS/MacLight
Identifier: skattyadz.MacLight
Version: 1.0 (1)
Code Type: X86-64 (Native)
Parent Process: launchd [410]
Date/Time: 2012-04-10 16:40:41.309 +0100
OS Version: Mac OS X 10.7.3 (11D50b)
Report Version: 9
@jdelStrother
jdelStrother / gist:1826891
Created February 14, 2012 13:46
O2 Ireland / HTTP status transformations

Our iPhone app (http://audioboo.fm) uploads users' audio over HTTP. If an upload fails for whatever reason (not uncommon over a cellular network), the server responds with HTTP 422, and the phone retries. The phone will continue retrying until it receives HTTP 2xx.

We've had a few users reporting problems where the phone thinks the upload has succeeded (and so stops trying to re-upload), despite the server responding with 422. On investigation, it seems like all of these users were using cellular data, on O2 in Ireland.

I'm working off a small samplesize here - only half a dozen users have actually come to us reporting the issue - and I don't have detailed information on what the app is actually receiving from the server, so this may be complete speculation. However, I think what is happening is that the 422 response is somehow getting transformed by O2's 3G network to a 200.

So -

  1. does that sound plausible, or have we got something completely different going on
[0.000][INFO]: ChromeDriver 18.0.1022.0 /Users/_jenkins/chromedriver/chromedriver
[0.209][FINE]: Initializing session with capabilities {
"browserName": "chrome",
"chrome.detach": true,
"chromeOptions": {
"detach": true
},
"cssSelectorsEnabled": true,
"javascriptEnabled": true,
"nativeEvents": false,
server {
server_name www.foo.com;
return 301 foo.com$request_uri;
}
server {
listen [::]:80;
server_name foo.com;
return 200;
}
$ ./redis-load
PRNG seed is: 1790627319 - use the 'seed' option to reproduce the same sequence
====== Report ======
10000 requests in 14.459 seconds
691.61 requests per second
50 parallel clients
payload: 1..64 bytes
keep alive: 1
29.16% < 1 ms